vpb-driver-4.2.57/0002755000175000017500000000000012201552737012055 5ustar ronronvpb-driver-4.2.57/README.OpenPCI0000644000175000017500000001047012201546752014171 0ustar ronronREADME.OpenPCI ============== Last updated: 30 Apr 2008 OpenPCI Driver Installation =========================== Prerequisites: it is assumed that before reading this document you have the OpenPCI card already installed in a system and that you have a working installation of Linux on that machine. Some Linux system administration skills are assumed, with at least sufficient knowledge to compile and install software, including kernel modules, from source. It is expected that you have an operational development environment, including the GNU C and C++ compilers. vpb-driver 4.2 requires OpenPCI cards to have firmware version 14. Please contact Voicetronix to arrange a firmware upgrade if required. The most recent vpb-driver release may be found at: http://www.voicetronix.com/downloads.htm The OpenPCI card requires the vtcore driver from this package. To build and install the library and support files: $ ./configure && make $ su # make install Still working as the root user, generate the config files: # ./src/utils/VpbConfigurator This script will detect the cards you have in the system and ask questions for anything it is unable to detect. You will need to know in advance: - your country code This is the code used for dialling your country from overseas. For example, if you are in Australia it will be 61, if you are in the UK it will be 44, if you are in the US it will be 1, and so on. If you don't know it, you can look for it here: http://en.wikipedia.org/wiki/List_of_country_calling_codes VpbConfigurator will write the files /etc/vpb/vpb.conf and /etc/vpb/vtcore.conf. These files may be modified for user specific requirements. See README.VpbConfig for available options. Load the kernel module: # modprobe vtopenpci You should see some initialisation messages reported to the system log file (/var/log/messages or /var/log/syslog depending on your distro), and the module should appear in the output of lsmod: # lsmod | grep vtopenpci vtopenpci 64564 0 vtcore 30476 1 vtopenpci Check that the card is not sharing interrupts with other devices: # cat /proc/interrupts | grep vtopenpci 5: 692527402 XT-PIC vtopenpci 7: 692566372 XT-PIC vtopenpci 10: 692511672 XT-PIC vtopenpci 12: 692750926 XT-PIC vtopenpci In the case of the machine above, there are four OpenPCI cards installed, and each has its own interrupt line assigned (the first number before the ':' above). If other device drivers are listed for any of these interrupt lines (including other vtopenpci instances), then you will be likely to have audio (and other signalling) corruption occur. For machines being deployed in production locations it is highly recommended that the kernel module be loaded using `modprobe vtopenpci shareirq=0`. This will cause it (or any conflicting device if it is loaded first), to entirely fail to load. In such cases an obvious and catastrophic failure is preferable to a subtle and hard to pinpoint one, but for initial testing, such a level of strictness can be overkill and make it less obvious which devices are in contention for the interrupt line. How to resolve any such conflict is machine and device dependent. Some PC's allow you to change this from their BIOS settings, for others you may need to place the card (or the conflicting device) into some other PCI slot. You are now ready to start developing your CT software, or installing pre-developed software such as CT Server (available from Voicetronix). ----------------------------------------------------------------------- Some Questions we've been asked more than once: ============================================== Q: What do the little blinking lights on the back of the card tell me? A: That depends on the type of the port: For FXS ports, the brightness of the LED is tied to the voltage that is currently being maintained on the line. So they are off before the port is powered up, will blink a bit while it is being calibrated, and burn brightly when the port is powered up in the on-hook state. Usually you can see them get a bit dimmer when the line goes off-hook. For FXO ports, they will be off while the port is on-hook, and will light if the port is switched off hook. This is independent of any voltage on the line and just shows the state of the circuit switch. vpb-driver-4.2.57/Version.in0000644000175000017500000000027412201546752014033 0ustar ronron# Build time version information for OpenPCI firmware and utilities # GNU make syntax lives here. # # Ron Lee , 2006 version = @PACKAGE_VERSION@ @NO_OSW_RING_SYNC@ vpb-driver-4.2.57/vpb-detect/0002755000175000017500000000000012201546752014112 5ustar ronronvpb-driver-4.2.57/vpb-detect/vpbscan.c0000644000175000017500000001716012201546752015715 0ustar ronron/*---------------------------------------------------------------------------*\ FILE....: VPBSCAN.C TYPE....: C Console program AUTHOR..: Jean-Michel Dault DATE....: 19/08/03 This program scans the PCI bus for OpenSwitch boards and prints info. Voicetronix Voice Processing Board (VPB) Software Copyright (C) 1999-2006 Voicetronix www.voicetronix.com.au This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ #include #include #include #include #include #include #define V6PCI 0x20365654 #define V12PCI 0x31325654 #define V4PCI 0x56345654 #define MAX_BOARDS 12 static struct pci_access *pacc; struct device { struct device *next; struct pci_dev *dev; unsigned int config_cnt; unsigned char config[256]; }; static struct device *first_dev; //static int verbose; /* Show detailed information */ static int show_hex; /* Show contents of config space as hexadecimal numbers */ //static struct pci_filter filter; /* Device filter */ static void __attribute__((noreturn)) die(const char *msg, ...) { va_list args; va_start(args, msg); fputs("lspci: ", stderr); vfprintf(stderr, msg, args); fputc('\n', stderr); exit(1); } // alias for die() since pciutils callbacks are not const correct static void __attribute__((noreturn)) libpci_error(char *msg, ...) { va_list args; va_start(args, msg); fputs("lspci: ", stderr); vfprintf(stderr, msg, args); fputc('\n', stderr); exit(1); } static void *xmalloc(unsigned int howmuch) { void *p = malloc(howmuch); if (!p) die("Unable to allocate %d bytes of memory", howmuch); return p; } static struct device *scan_device(struct pci_dev *p) { int how_much = (show_hex > 2) ? 256 : 64; struct device *d; /* if (!pci_filter_match(&filter, p)) return NULL; */ d = xmalloc(sizeof(struct device)); memset(d, 0, sizeof(struct device)); d->dev = p; if (!pci_read_block(p, 0, d->config, how_much)) die("Unable to read %d bytes of configuration space.", how_much); if (how_much < 128 && (d->config[PCI_HEADER_TYPE] & 0x7f) == PCI_HEADER_TYPE_CARDBUS){ /* For cardbus bridges, we need to fetch 64 bytes more to get the full standard header... */ if (!pci_read_block(p, 64, d->config+64, 64)) die("Unable to read cardbus bridge extension data."); how_much = 128; } d->config_cnt = how_much; pci_setup_cache(p, d->config, d->config_cnt); pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES); return d; } static void scan_devices(void) { struct device *d; struct pci_dev *p; pci_scan_bus(pacc); for(p=pacc->devices; p; p=p->next){ if((d = scan_device(p)) != NULL){ d->next = first_dev; first_dev = d; } } } /* Config space accesses */ static inline uint8_t get_conf_byte(struct device *d, unsigned int pos) { return d->config[pos]; } #if 0 static uint16_t get_conf_word(struct device *d, unsigned int pos) { return d->config[pos] | (d->config[pos+1] << 8); } static u32 get_conf_long(struct device *d, unsigned int pos) { return d->config[pos] | (d->config[pos+1] << 8) | (d->config[pos+2] << 16) | (d->config[pos+3] << 24); } #endif /* Sorting */ static int compare_them(const void *A, const void *B) { const struct pci_dev *a = (*(struct device* const*)A)->dev; const struct pci_dev *b = (*(struct device* const*)B)->dev; if (a->bus < b->bus) return -1; if (a->bus > b->bus) return 1; if (a->dev < b->dev) return -1; if (a->dev > b->dev) return 1; if (a->func < b->func) return -1; if (a->func > b->func) return 1; return 0; } static void sort_them(void) { struct device **index, **h, **last_dev; int cnt; struct device *d; cnt = 0; for(d=first_dev; d; d=d->next) cnt++; h = index = alloca(sizeof(struct device *) * cnt); for(d=first_dev; d; d=d->next) *h++ = d; qsort(index, cnt, sizeof(struct device *), compare_them); last_dev = &first_dev; h = index; while (cnt--){ *last_dev = *h; last_dev = &(*h)->next; h++; } *last_dev = NULL; } #if 0 static void show_terse(struct device *d) { int c; struct pci_dev *p = d->dev; char classbuf[128], devbuf[128]; printf("%02x:%02x.%x %s: %s", p->bus, p->dev, p->func, pci_lookup_name(pacc, classbuf, sizeof(classbuf), PCI_LOOKUP_CLASS, get_conf_word(d, PCI_CLASS_DEVICE), 0, 0, 0), pci_lookup_name(pacc, devbuf, sizeof(devbuf), PCI_LOOKUP_VENDOR | PCI_LOOKUP_DEVICE, p->vendor_id, p->device_id, 0, 0)); c = get_conf_byte(d, PCI_REVISION_ID); if(c) printf(" (rev %02x)", c); if (verbose){ char *x; c = get_conf_byte(d, PCI_CLASS_PROG); x = pci_lookup_name(pacc, devbuf, sizeof(devbuf), PCI_LOOKUP_PROGIF, get_conf_word(d, PCI_CLASS_DEVICE), c, 0, 0); if (c || x){ printf(" (prog-if %02x", c); if (x) printf(" [%s]", x); putchar(')'); } } putchar('\n'); } #endif int main(void) { struct device *d; struct pci_dev *dev; u32 s[MAX_BOARDS]; int numboards=0; pacc = pci_alloc(); /* Get the pci_access structure */ pacc->error = libpci_error; /* Set all options you want -- here we stick with the defaults */ pci_init(pacc); /* Initialize the PCI library */ scan_devices(); sort_them(); for(d=first_dev; d; d=d->next) { dev=d->dev; pci_fill_info(dev, PCI_FILL_IDENT | PCI_FILL_BASES); /* Fill in header info we need */ if(dev->vendor_id==0x10b5 && dev->device_id==0x9050) { s[numboards] = pci_read_long(dev, 0x2c); /* Read config register directly */ if(s[numboards]==V6PCI) { printf("CARD%d:V6PCI:",numboards+1); } else if(s[numboards]==V12PCI) { printf("CARD%d:V12PCI:",numboards+1); } else if(s[numboards]==V4PCI) { printf("CARD%d:V4PCI:",numboards+1); } else { printf("CARD%d:UNKNOWN:",numboards+1); } printf("irq=%d sub=%04x bus-dev:%02X:%02X\n", dev->irq,s[numboards],dev->bus,dev->dev); numboards++; } else if(dev->vendor_id==0x1923 && dev->device_id==0x0300) { printf("CARD%d:OPENPRI:",numboards+1); printf("irq=%d sub=%04x bus-dev:%02X:%02X\n", dev->irq,0,dev->bus,dev->dev); numboards++; } else if(dev->vendor_id==0x1923 && dev->device_id==0x0040) { printf("CARD%d:OPENPRIv2:",numboards+1); printf("irq=%d sub=%04x bus-dev:%02X:%02X\n", dev->irq,0,dev->bus,dev->dev); numboards++; } else if(dev->vendor_id==0x1923 && dev->device_id==0x0100) { printf("CARD%d:QUADOPENPRIv2:",numboards+1); printf("irq=%d sub=%04x bus-dev:%02X:%02X\n", dev->irq,0,dev->bus,dev->dev); numboards++; } else if(dev->vendor_id==0xe159 && dev->device_id==0x0001) { // e159:0001 printf("CARD%d:OPENPCI:",numboards+1); printf("irq=%d sub=%04x bus-dev:%02X:%02X\n", dev->irq,0,dev->bus,dev->dev); numboards++; } } if(numboards==0) { printf("Cannot find any Voicetronix boards.\n"); return 255; } else { printf("BOARDS:%d\n",numboards); } pci_cleanup(pacc); /* Close everything */ return 0; } vpb-driver-4.2.57/vpb-detect/vpbconf.cpp0000644000175000017500000000545612201546752016263 0ustar ronron/*---------------------------------------------------------------------------*\ Query model and port information for installed Voicetronix hardware. Voicetronix Voice Processing Board (VPB) Software Copyright (C) 2003 - 2007 Voicetronix www.voicetronix.com.au Originally contributed by Jean-Michel Dault, 20/8/03 This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA \*---------------------------------------------------------------------------*/ #include #include #include #include #include #include "vpbapi.h" #include "verbose.h" int main() { int numboards = vpb_get_num_cards(); int portcount = 0; printf("\nCards detected: %d\n\n", numboards); for(int i=0; i < numboards; ++i) { VPB_CARD_INFO card_info; int numports = vpb_get_ports_per_card(i); int h = vpb_open(i,0); VPB_MODEL card_type = vpb_get_card_type(h); vpb_get_card_info(i, &card_info); printf("BOARD %d (%d ports)\n", i, numports); switch(card_type) { case VPB_V4PCI: case VPB_V4LOG: printf("MODEL : %s\n", card_info.model); printf("DATE : %s\n", card_info.date); printf("REVISION : %s\n", card_info.rev); printf("SERIAL NUMBER : %s\n", card_info.sn); break; case VPB_OPCI: case VPB_OSW: printf("MODEL : %s\n", card_info.model); printf("SERIAL NUMBER : %s\n", card_info.sn); break; default: printf("MODEL : %s\n", card_info.model); break; } int port_type[numports]; port_type[0] = vpb_get_port_type(h); for( int j = 1; j < numports; ++j ) { h = vpb_open(i,j); port_type[j] = vpb_get_port_type(h); vpb_close(h); } printf("TRUNK PORTS : "); for(int j = 0; j < numports; ++j) if( port_type[j] == VPB_FXO) printf("%d ", portcount + j); printf("\n"); printf("STATION PORTS : "); for(int j = 0; j < numports; ++j) if( port_type[j] == VPB_FXS) printf("%d ", portcount + j); printf("\n\n"); portcount += numports; } vpb_close(); return 0; } vpb-driver-4.2.57/vpb-detect/README0000644000175000017500000000033012201546752014764 0ustar ronronAutoconfiguration software submitted by Jean-Michel Dault. Note that this software will not work correctly on some very early OpenSwitch12 cards due to a firmware bug - contact Voicetronix support for more details. vpb-driver-4.2.57/vpb-detect/Makefile.in0000644000175000017500000000207712201546752016163 0ustar ronron# Simple makefile for VPB detection utility targets # Ron Lee, 2007 TARGETS = vpbscan vpbconf srcdir := @srcdir@ top_srcdir := @top_srcdir@ top_builddir := @top_builddir@ include $(top_builddir)/Makefile.common vpath %.c $(srcdir) vpath %.cpp $(srcdir) all: $(TARGETS) vpbscan: LDLIBS += -lpci -lz vpbscan: vpbscan.c $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS) vpbconf: CPPFLAGS += -pthread -I$(top_srcdir)/src/libvpb vpbconf: LDFLAGS += -L$(top_builddir)/src/libvpb vpbconf: LDLIBS += -lvpb vpbconf: vpbconf.o ifeq ($(LIB_TYPE),shared) vpbconf: LDFLAGS += -Wl,-rpath-link,$(top_builddir)/src/libtoneg else vpbconf: LDFLAGS += -pthread vpbconf: lib-stamp lib-stamp: $(top_builddir)/src/libvpb/libvpb.a \ $(top_builddir)/src/libtoneg/libtoneg.a touch $@ endif vpbconf: $(CXX) $(LDFLAGS) vpbconf.o $(LDLIBS) -o $@ install: vpbscan vpbconf mkdir -p $(DESTDIR)$(sbindir) cp $(TARGETS) $(DESTDIR)$(sbindir) clean: $(RM) $(TARGETS) lib-stamp *.o *.d core* distclean: clean $(RM) Makefile .PHONY: all install clean distclean vpb-driver-4.2.57/configure.ac0000644000175000017500000001324312201546752014344 0ustar ronron# Configuration script for vpb-driver. AC_INIT([vpb-driver], [4.2.57], [support@voicetronix.com.au]) AC_COPYRIGHT([Copyright (C) 1997 - 2013, Voicetronix]) AC_PREREQ(2.59) AC_CONFIG_SRCDIR([README.VTCore]) AC_CONFIG_AUX_DIR(ac-aux) PACKAGE_VERSION_MAJOR="${PACKAGE_VERSION%%.*}" PACKAGE_VERSION_MINOR="${PACKAGE_VERSION#*.}" PACKAGE_VERSION_MINOR="${PACAKGE_VERSION_MINOR%.*}" PACKAGE_VERSION_PATCH="${PACKAGE_VERSION##*.}" AC_SUBST(PACKAGE_VERSION_MAJOR) AC_SUBST(PACKAGE_VERSION_MINOR) AC_SUBST(PACKAGE_VERSION_PATCH) AC_SUBST(PACKAGE_RELEASE) AC_CANONICAL_BUILD AC_CANONICAL_HOST case $host in *-*-linux* ) HOST_OS=linux ;; *-*-freebsd* ) HOST_OS=freebsd ;; *-*-cygwin* | *-*-mingw32* ) HOST_OS=billware ;; * ) AC_MSG_ERROR([Unknown host type. Stopping.]) esac AC_SUBST(HOST_OS) # Don't let these get set by AC_PROG_* below. CFLAGS= CXXFLAGS= AC_PROG_CC AC_PROG_CPP AC_PROG_CXX AC_PROG_CXXCPP AC_CHECK_TOOL(AR, ar) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [enable extra debugging code (default NO)]), ac_cv_enable_debug=$enableval, ac_cv_enable_debug=no) # This option enables us to create detached debugging symbols for release # builds, such as are included in the libvpb-dbg Debian packages. # It has no effect if --enable-debug is already used. AC_ARG_ENABLE(debug-syms, AC_HELP_STRING([--enable-debug-syms], [include debugging symbols in optimised builds (default NO)]), ac_cv_enable_debug_syms=$enableval, ac_cv_enable_debug_syms=no) if test $ac_cv_enable_debug = yes; then ac_cv_enable_debug_syms=no cpp_flags="$cpp_flags -D_DEBUG" cxx_flags="$cxx_flags -g" cc_flags="$cc_flags -g" else cxx_flags="$cxx_flags -O3" cc_flags="$cc_flags -O3" if test $ac_cv_enable_debug_syms = yes; then cxx_flags="$cxx_flags -g" cc_flags="$cc_flags -g" fi fi AC_ARG_ENABLE(ring-sync, AC_HELP_STRING([--enable-ring-sync], [enable OpenSwitch to sync ring with zero crossing (default YES)]), ac_cv_enable_ring_sync=$enableval, ac_cv_enable_ring_sync=yes) if test $ac_cv_enable_ring_sync != yes; then NO_OSW_RING_SYNC="export NO_OSW_RING_SYNC := -DNO_OSW_RING_SYNC" fi AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build a shared rather than static library (default NO)]), ac_cv_enable_shared=$enableval, ac_cv_enable_shared=no) if test $ac_cv_enable_shared = yes; then LIB_TYPE=shared else LIB_TYPE=static fi AC_ARG_WITH(pri, AC_HELP_STRING([--with-pri], [include support for ISDN devices, requires wanpipe (default NO)]), ac_cv_with_pri=$withval, ac_cv_with_pri=no) AC_ARG_ENABLE(caslog, AC_HELP_STRING([--enable-caslog], [configure for cas logging, implies --with-pri (default NO)]), ac_cv_enable_caslog=$enableval, ac_cv_enable_caslog=no) if test $ac_cv_enable_caslog = yes; then ac_cv_with_pri=yes CASLOG=enable_caslog fi if test $ac_cv_with_pri = yes; then if test -d /etc/wanpipe; then LIBVPB_PRI_CPPFLAGS="-D_OPENPRI -I\$(top_srcdir)/src" LIBVPB_PRI_OBJ="\$(PRI_OBJ)" else AC_MSG_ERROR([/etc/wanpipe is not installed, cannot build --with-pri]) fi fi AC_ARG_ENABLE(softbridge, AC_HELP_STRING([--enable-softbridge], [drop samples during silence to ensure minimum latency in soft bridges, implies --enable-realtime-threads (default NO)]), ac_cv_enable_softbridge=$enableval, ac_cv_enable_softbridge=no) if test $ac_cv_enable_softbridge = yes; then SOFTBRIDGE=enable_softbridge fi AC_ARG_ENABLE(realtime-threads, AC_HELP_STRING([--enable-realtime-threads], [use realtime audio threads to reduce audio latency in soft bridges (default YES if --enable-softbridge, else NO)]), ac_cv_enable_realtime_threads=$enableval, if test $ac_cv_enable_softbridge = yes; then ac_cv_enable_realtime_threads=yes else ac_cv_enable_realtime_threads=no fi ) if test $ac_cv_enable_realtime_threads = yes; then REALTIME_THREADS=enable_realtime_threads fi if test $HOST_OS != billware; then AC_CHECK_LIB([pthread], [pthread_create], [], [AC_MSG_ERROR([pthread library not found])]) fi AC_CHECK_LIB([z], [gzopen], [], [AC_MSG_ERROR([zlib library not found])], []) AC_CHECK_LIB([pci], [pci_read_block], [], [AC_MSG_ERROR([pciutils library not found])], []) CPPFLAGS="$CPPFLAGS$cpp_flags" CXXFLAGS="$CXXFLAGS$cxx_flags" CFLAGS="$CFLAGS$cc_flags" AC_SUBST(LIB_TYPE) AC_SUBST(LIBVPB_PRI_OBJ) AC_SUBST(LIBVPB_PRI_CPPFLAGS) AC_SUBST(NO_OSW_RING_SYNC) AC_SUBST(CASLOG) AC_SUBST(REALTIME_THREADS) AC_SUBST(SOFTBRIDGE) # Check for compile options # Checks for header files # Checks for typedefs, structures, and compiler characteristics AC_C_CONST AC_CONFIG_FILES([Version Makefile Makefile.common src/Makefile src/libtoneg/Makefile src/libvpb/Makefile src/libvpb/doc/doxyconf src/utils/Makefile vpb-detect/Makefile]) AC_CONFIG_FILES([src/utils/VpbConfigurator], [chmod a+x src/utils/VpbConfigurator]) AC_OUTPUT echo echo "Configured vpb-driver $PACKAGE_VERSION:" echo echo " library linkage: $LIB_TYPE" echo " using pri: $ac_cv_with_pri" echo " using debug mode: $ac_cv_enable_debug" if test $ac_cv_enable_debug_syms = yes; then echo " with debug syms: $ac_cv_enable_debug_syms" fi echo vpb-driver-4.2.57/README.OpenPRI0000644000175000017500000001063712201546752014215 0ustar ronronREADME.OpenPRI ============== Last updated: 3 March 2009 Introduction ------------ The Voicetronix Primary Rate ISDN (PRI) card unites Sangoma's ISDN technology with the common API used by all other Voicetronix cards. To use them, the Sangoma Wanpipe drivers must be installed before compiling the Voicetronix driver package. Wanpipe Driver Installation --------------------------- As of this writing, the current recommended Wanpipe driver is version 3.1.15, available from the downloads area of the Voicetronix website: http://www.voicetronix.com/Downloads/wanpipe/ It has been tested on Debian GNU/Linux 5.0 (Lenny). Before attempting the installation, a number of packages are required. i. C and C++ development tools (gcc, g++) ii. make iii. ncurses library iv. awk v. flex vi. patch vii. yacc viii. libz ix. libpci (also known as pciutils) x. linux kernel headers Note that most of the linux distributions will have binary versions of all these packages, albeit with different names. See Appendix A for exact package names for Debian. Now you are ready to downloaded the wanpipe driver, unpack the archive, change into its directory and under the root user run: # ./Setup install For most questions, 'y' or the default option should be sufficient. You will require the custom compilation mode (option 9) and then select only AFT_TE1. After this script completes, all further configuration of Wanpipe is performed by utilities provided in the vpb-driver package. VPB Driver Installation ----------------------- If you have not already done so, unpack the vpb-driver archive, then change into its directory and run as root user the commands: # ./configure --with-pri # make # make install OR $ ./configure --with-pri --enable-caslog # make # make install The --enable-caslog option should be used with the Voicetronix logger application in CAS mode, or any other application requiring voice activity detection. Final Steps ----------- Still working as the root user, use the VpbConfigurator script to generate configuration files for both the Wanpipe and VPB drivers: # ./src/utils/VpbConfigurator This script will detect the cards you have in the system and ask questions for anything it is unable to detect. You will need to know in advance: - your country code This is the code used for dialling your country from overseas. For example, if you are in Australia it will be 61, if you are in the UK it will be 44, if you are in the US it will be 1, and so on. If you don't know it, you can look for it here: http://en.wikipedia.org/wiki/List_of_country_calling_codes - type of PRI connection This will be one of E1, T1, or J1. E1 is the standard used throughout Europe, Australia, and some other places. T1 is predominantly used in the USA, and J1 is used in Japan. - mode of PRI connection This will be either client or network mode. Most connections are client mode, unless you are connecting to equipment that would otherwise expect to be connected to a PRI line coming directly from a Telco. If in doubt try client mode. VpbConfigurator will write the files /etc/vpb/vpb.conf and /etc/vpb/openpri.conf. These files may be modified for user specific requirements. See README.VpbConfig for available options. You may now load the Wanpipe kernel modules: # wanrouter start You should see some initialisation messages reported to the system log file (/var/log/messages or /var/log/syslog depending on your distro), and the OpenPRI card(s) should appear in the output of "wanrouter status": # wanrouter status Devices currently active: wanpipe1 Wanpipe Config: Device name | Protocol Map | Adapter | IRQ | Slot/IO | If's | CLK | Baud rate | wanpipe1 | N/A | A101/2 | 201 | 14 | 3 | EXT | 0 | Wanrouter Status: Device name | Protocol | Station | Status | wanpipe1 | AFT HDLC | N/A | Connected | You are now ready to start developing your CT software, or installing pre-developed software such as CT Server (available from Voicetronix). A.1 Debian Lenny ---------------- A number of packages are required before installing the OpenPRI driver. Just install the following packages after a minimal stndard server NET install. i. gcc ii. g++ iii. make iv. libncurses5-dev v. original-awk vi. flex vii. patch viii. bison ix. zlib1g-dev x. pciutils-dev xi. module-assistant To set up your linux kernel headers correctly run # module-assistant prepare vpb-driver-4.2.57/COPYING0000644000175000017500000000120112201546752013100 0ustar ronron Voicetronix Voice Processing Board (VPB) Software Copyright (C) 1999-2007 Voicetronix www.voicetronix.com This package contains an aggregation of works. The kernel driver code and libpri are distributed according to the terms of the GNU GPL. The user-space (libvpb) code is distributed according to the terms of the GNU LGPL. The OpenLine firmware binary is licensed to you ONLY for use with Voicetronix hardware. It may be distributed freely for that purpose, but may not be used without Voicetronix hardware, nor may it be modified in any way to be used without Voicetronix hardware. vpb-driver-4.2.57/README.VpbConfig0000644000175000017500000001576012201546752014620 0ustar ronronREADME.VpbConfig ================ Last updated: 7 Aug 2007 Important Note For Upgraders ---------------------------- Starting with the 4.1 release of the vpb-driver, some changes were introduced to the configuration file options. If you are updating from an earlier version, please see the migration guide at the bottom of this file. Introduction ------------ If you wish to use the Voicetronix OpenPRI card, or more than 1 type of Voicetronix card, you will REQUIRE configuration files. If you are only using one type of analogue card and do not need to alter the default settings, then using the configuration files is optional. All configuration files for the VPB driver are kept in /etc/vpb. The common configuration file for all card types is vpb.conf. The card specific files are typically named vtcore.conf, openline.conf, or openpri.conf, though this is configurable from vpb.conf. The VpbConfigurator tool (found under src/utils in the driver source) is the preferred method for initial setup of these configuration files. This will create a default configuration based on the hardware detected which can then be fine tuned based on your individual requirements. vpb.conf -------- The vpb.conf file contains some basic information about the cards in the system, and about the system itself. It consists of 3 sections: The [general] section for general system information. The [configs] section provides locations for the card-specific configuration files (e.g. openline.conf, vtcore.conf, openpri.conf). The [cards] section lists the cards and the order in which they will be presented to the vpb API. [general] name = general country = 61 verbosity = 1 [configs] vtcore = /etc/vpb/vtcore.conf openline = /etc/vpb/openline.conf openpri = /etc/vpb/openpri.conf [cards] 0 = openpci:0 1 = openswitch:1 2 = openline:1 3 = openpri:0 4 = openline:0 5 = openlog:2 vtcore.conf ----------- The vtcore.conf file contains information about the OpenPCI and OpenSwitch cards in your machine. See the file "README.VTCore" for more details. Here is an example, with comments: [general] name = vtcore cards = 2 [card0] " where Number starts from 0> type = OpenPCI logging = 1 chan = 4 chan = 5 chan = 6 chan = 7 [card1] " where Number starts from 0> type = OpenSwitch12 dtmfms = 70 cutthrough = 10.0 chan = 0 chan = 1 ... country = 1 overrides the global setting for subsequent ports chan = 11 openline.conf ------------- The openline.conf file contains information about the OpenLine and OpenLog cards in your machine. Here is an example, with comments: [general] name = openline cards = 2 [card0] " where Number starts from 0> type = OpenLine4 bal1 = 0xf0 bal2 = 0x5d bal3 = 0x70 chan = 0 chan = 1 chan = 2 chan = 3 [card1] " where Number starts from 0> type=OpenLine4 openpri.conf ------------ The openpri.conf file contains the information about the OpenPRI cards in your machine, and the settings required to connect to the ISDN line attached to it. It MUST match information in the wanpipe configuration file and the configuration of your ISDN line. [general] name=openpri channels=30 cards=1 [card3] " where Number starts from 0> priverbose=32 name=wanpipe1 iftype=E1 node=client protocol=euroisdn_e1 dialplan=national localdialplan=national dchannel=16