diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-09 19:12:55 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-09 19:12:55 +0000 |
commit | cc599ab08d6f58a2d5e57db4150e2f9efe1112b8 (patch) | |
tree | 3f6df61996f5a6df4f05cd447c2b120ae8b4669e /xpp/README.Astribank | |
parent | eeaa77f409b4e0e158e62cb852e462ccef317f3f (diff) |
Merged revisions 2123-2124 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.4
........
r2123 | tzafrir | 2007-02-08 02:05:17 +0200 (Thu, 08 Feb 2007) | 27 lines
Branch 1.4 is back in sync (currently: xorcom rev. 3332):
* Performance improvements for multi-XPD (span) devices.
* Astribank BRI driver (in next commit).
* Changes under /proc:
- XBUS and XPD numbers have two digits.
- Every script wildcard should be replaced from XBUS-? to XBUS-[0-9]*
- Added /proc/xpp/XBUS-*/XPD-*/blink: echo 1 to start and 0 to stop.
* Several countries (South Africa, UAE, anybody else) require a shorter
ring delay. Adjust FXO reg 0x17 (23)'s bits 0:2 to 011.
* Use tasklets to move most of the interrupt PCM copying out of the interrupt.
* Debugfs-based code to dump data to userspace (used to debug BRI D channel).
* Pretend every 2.6.9 actually has later RHEL's typedefs.
* fpga_load supports /dev/bus/usb .
* Fixed physical order sorting in genzaptelconf.
* Reverse polarity and power denial detection.
* A short led flash at registration time.
* Add a real version of the xpp modules to them (independent of the Zaptel
version).
* Update our line status even when not registered.
* Fixed a false SIG_CHANGED when inserting or removing cable to FXO.
* Fixed compilation fixes for 2.6.20 (Bug #8982)
* A cleaner fix for the bool changes of 2.6.19 .
* Automatically detect echo_can_state_t at debug time.
* Automaitcally set XPP_DEBUGFS (depending on debugfs) at compile time.
* Bug-fixes to zaptel-helper. Moved to xpp/utils .
* Xbus protocol version: 2.4 (Zaptel 1.2.12/1.4.0 had 2.3).
XPS Init scripts renamed accordingly.
........
r2124 | tzafrir | 2007-02-08 02:30:56 +0200 (Thu, 08 Feb 2007) | 1 line
Now 'chans' is used after all.
........
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2144 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/README.Astribank')
-rw-r--r-- | xpp/README.Astribank | 95 |
1 files changed, 90 insertions, 5 deletions
diff --git a/xpp/README.Astribank b/xpp/README.Astribank index 221ef3a..4e83142 100644 --- a/xpp/README.Astribank +++ b/xpp/README.Astribank @@ -22,9 +22,10 @@ firmware and initialization files for the Astribank: make -C xpp/utils -In order to build the user space utilities, you will need the libusb-dev -package on Debian (and derivatives like ubuntu) or libusb-devel on RedHat +In order to build the user space utilities, you will need the libusb-dev +package on Debian (and derivatives like ubuntu) or libusb-devel on RedHat (and derivatives like Centox/Trixbox). + INSTALLATION: """""""""""" @@ -130,11 +131,54 @@ number. So you need to re-check the value of NNN with lsusb. Typically this will be the old value + 1. +Firmware Loading with Hotplug: +""""""""""""""""""""""""""""" +The Hotplug framework was popular for hotplugging and usually also +autoloading drivers. If it is used on your system, you'll see +/etc/hotplug with many files under it. Hotplug will automatically load +most relevant USB and PCI kernel modules by the relevant USB and PCI +IDs. Again: if the framework is in place and the proper configuration +files are in place, the firmware should be loaded automatically. + +In order to get hotplug to autoload the firmware into the Astribank, +the configuration file xpp_fxloader.usermap and the script xpp_fxloader +should be copied into /etc/hotplug/usb/ . This is done by 'make -C +xpp/utils install' . + +xpp_fxloader.usermap includes a map of USB IDs and the command to run +when they are encountered. It instructs hotplug to run the script +xpp_fxloader from that directory. This is done by 'make -C +xpp/utils install' . + +When xpp_fxloader is run without any parameters it assumes that it was +run by the hotplug scripts. It will then check if the even is an "add" +event (and not a "remove" event), and if so, install the required +firmware file. It will be called twice, as after the load of the USB +firmware the device will reenumerate itself and thus "unplug" and +"replug" to load the FPGA firmware. + + Firmware Loading with UDEV: """""""""""""""""""""""""" -Firmware loading with udev should work but is not installed -automatically, yet. See the comments in the beginning of the script -/etc/hotplug/usb/xpp_fxloader . +The UDEV framework has replaced Hotplug in most recent systems. If you +have a recent 2.6 system with no Hotplug and files under /etc/udev, +chances are you ude udev. udev does quite a few nice things. +Again: if the framework is in place and the proper configuration +files are in place, the firmware should be loaded automatically. + +In order to get hotplug to autoload the firmware into the Astribank, +the configuration file xpp.rules should be copied into /etc/udev/rules.d +and the script xpp_fxloader should be copied into /etc/hotplug/usb/ . +This is done by 'make -C xpp/utils install' . + +xpp.rules instructs udevd to run xpp_fxloader with the option udev and +the USB ID when an Astribank is plugged and needs loading firmware. +When xpp_fxloader is run with the option udev it assumes that it was +run by udevd scripts. It will then install the required firmware file. +It will be called twice, as after the load of the USB firmware the +device will reenumerate itself and thus "unplug" and "replug" to load +the FPGA firmware. + Loading The Modules: """"""""""""""""""" @@ -301,6 +345,47 @@ When loaded, you should get one span, of 8 extensions, 2 output ports and 13 XPP_IN/0-12 FXOKS (In use) 14 XPP_IN/0-13 FXOKS (In use) +Sample dialplan (extentions.conf) for all the above: + +[phones-zap] +; 401 will dial to channel 1, 420, to zaptel channel 20, etc. +exten => _4XX,1,Dial(ZAP/${EXTEN:1}) + +[trunk-9] +; Dial through the first FXO port availble. +; This assumes that all FXO ports are in group 0 and all others are not, +; as in the sample zapata.conf for 8FXS/8FXO below, and as is generated +; by genzaptelconf by default. +exten => 9.,Dial(Zap/g0/${EXTEN:1}) + +[from-internal] +; The context of FXS ports: analog phones. +; They are allowed to dial to all other phones +include => phones-zap +; They are also allowed to call through the trunk: +include => trunk-9 + +[from-pstn] +; Calls from the PSTN enter here. Redirect calls to an IVR +; or a default extension in the s context here. In this case we +; redirect calls to Zaptel channel 1: +exten => s,1,Dial(Zap/1) + +[astribank-inputs] +exten => s,1,Set(ZAP_CHAN=Cut(${CHANNEL},-,1)) +exten => s,n,Set(ZAP_CHAN=Cut(${ZAP_CHAN},/,2)) +; 11 is the number of the first input port. At least in the sample +; configuration below. +exten => s,n,Set(INPUT_NUM=Math(${ZAP_CHAN}-11)) +; The sample below just logs the signal. +exten => s,n,NoOp(Got signal from input port number ${INPUT_NUM}) +; Alternatively: +;exten => s,n,System(run something) + +; No. We did not forget the context astribank-outputs. Output +; ports only get calls from the PBX. Thus they don't need a context +; of their own. + /proc Interface """"""""""""""" |