From 21263d58b5659eb42d200a38b17da18fce49a881 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Sun, 29 Apr 2007 22:44:32 +0000 Subject: xpp rev. 3814: * Protocol no. 2.6: syncing improvements. * Support for 8-port Astribank BRI. * Firmware unloading now works: rmmod xpp_usb; /etc/hotplug/usb/xpp_fxloader reset * Defaults of kernel parameters are now part of parameter description. * World-readable kernel parameters. * No need for extra patch beyond bristuff for Astribank BRI. * Default poll intervals changed: 500 in BRI and FXO. * Allow changing FXS polls interval at run time. * BRI initalization fixed on SUSE (path to logger). * When using the SUSE zaptel rpm package, set modules_var=ZAPTEL_MODULES in /etc/sysconfig/zaptel . * zt_registration not verbose by default. * xpp_sync warns if FXO is sync slave. * Fixed genzaptelconf -z (zapscan output emulation). * PCM fixes. * Solves "multiple ticks" bug. No need for pcm_tasklets workaround. git-svn-id: http://svn.digium.com/svn/zaptel/trunk@2478 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/README.Astribank | 161 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 127 insertions(+), 34 deletions(-) (limited to 'xpp/README.Astribank') diff --git a/xpp/README.Astribank b/xpp/README.Astribank index 4e83142..102ae62 100644 --- a/xpp/README.Astribank +++ b/xpp/README.Astribank @@ -35,6 +35,12 @@ run: make -C xpp/utils install +Though this should be done automatically on zaptel >= 1.4.1 . + +Also consider editing xpp/utils/Makefile and removing the commant before +the line that begins with PERLLIBDIR. This will install some perl modules +and utilities that will help you with the usage of the Astribank. + Alternatively, do the following manually: All firmware files should be copied to a new directory: @@ -43,26 +49,45 @@ All firmware files should be copied to a new directory: The xpp_fxloader and xpp_fxloader.usermap should be copied to: /etc/hotplug/usb/ -In addition, the file xpp/xpp_modprobe contains optional modprobe settings. -It may be copied verbatim into /etc/modprobe.conf or (better) copied to -/etc/modprobe.d/ . - - Note that loading through udev is not yet provided. Run /etc/hotplug/usb/xpp_fxloader load to load firmware. -The FXS calibration script requires the perl module Time::HiRes. This -modules is already packaged for most distributions including Debian, Fedora, -RedHat and CentOS. To test for the existance of this module run: - perl -MTime::HiRes -e '' +LEDs Indication: +""""""""""""""" +The Astribank has 4 global indication leds and one or two per-port leds. +In the Astribank 16 and in the Astribank BRI (USB product IDs 113x and +114x, respectively) the indication leds will normally be in the side. + +In the 1U models (USB product IDs 115x) the indication leds will normally +be the first (leftmost) red leds of the device. Don't mistake them for +per-port leds. -This should run cleanly (without output) if the module exists and issue -a long error message otherwise. At least in RedHat, CentOS and Fedora-2 -until Fedora-5 it is in a package named perl-Time-HiRes. In Debian and -Fedora-6 it is bundled with perl. +The first led is the "Power" led. It is lit if the unit gets power. +The second led is the "Active" led, which is lit when there is there at +least one "active" (in a call / off-hook, though the meaning of this is +different in BRI). +The last led is called "Hardware OK", but is actually only lit if the +hardware is not OK. + +The third led is the "Sync" led. If it blinks, the device is in sync +with the driver on the computer. If the device is the synchronization +source for all the Astribank devices it will blink a quick single blink. +If the device gets synchronization from the driver, it will blink in a +more steady blink. + +"Double blink" indicates that the unit has an FXO module, and still is +getting synchronization from the computer, and does not provide +synchronization. + +The per-port green led on analog (both FXS and FXO) indicate that the +port is off-hook. + +On the BRI, the green led blinks when the port is TE and has layer-1 +connectivity to the other party, and the orange led blinks when the unit +is in NT mode and has layer-1 connectivity to the other party. DEVICE STARTUP: @@ -180,6 +205,13 @@ device will reenumerate itself and thus "unplug" and "replug" to load the FPGA firmware. +Firmware Resetting (Experimental): +""""""""""""""""""""""""""""""""" +Newer versions of the USB firmware can now be reset using 'fpga_load -r'. +This will only work when the device is not used by the driver, so you may +need to 'rmmod xpp_usb' in order to reset the firmware. + + Loading The Modules: """"""""""""""""""" Here is what should happen: @@ -234,9 +266,10 @@ bunch of values to certain registers in those chips. We decided that hardwiring those values in the driver itself would not be a good idea. before registering a XPD as a span in Zaptel, we run an initialization -script: /usr/share/zaptel/initialize_registers . If this fails (e.g: -because the script is not there, or is not executable), you will get an -error message in the logs [FIXME: quote error message] that the +script: /usr/share/zaptel/init_card_N_MM (N is 3 for an FXS span and 4 +for an FXO span, MM is a version number, and currently stands at 24). +If this fails (e.g: because the script is not there, or is not +executable), you will get an error message in the logs that the invocation has failed. The XPD will then be removed (you won't see that a directory for that XPD under the relevant /proc/xpp/XBUS-* directory) and not be registered with Zaptel. @@ -257,6 +290,8 @@ parameter zap_autoreg. Set in the modprobe configuration file (e.g: to disable automatic registration at startup. You will then need to register the spans manually. +For your convenience the command zt_registration + SAMPLE CONFIGURATIONS: """""""""""""""""""""" @@ -272,6 +307,24 @@ SAMPLE CONFIGURATIONS: fxoks=1-14 fxsks=15-22 + Astribank 4 BRI + # Assumed ports settings: + # Ports 1,3: TE + # Ports 2,4: NT + span=1,1,1,ccs,ami + span=2,0,1,ccs,ami + span=3,2,1,ccs,ami + span=4,0,1,ccs,ami + bchan=1-2 + dchan=3 + bchan=4-5 + dchan=6 + bchan=7-8 + dchan=9 + bchan=10-11 + dchan=12 + + /etc/asterisk/zapata.conf Astribank 8: @@ -286,11 +339,11 @@ SAMPLE CONFIGURATIONS: channel => 1-8 ; output ports: - context=astribank-outputs + context=astbank-outputs channel => 9-10 ; input ports: immediate=yes - context=astribank-inputs + context=astbank-inputs channel => 11-14 immediate=no @@ -306,11 +359,11 @@ SAMPLE CONFIGURATIONS: channel => 1-8 ; output ports: - context=astribank-outputs + context=astbank-outputs channel => 9-10 ; input ports: immediate=yes - context=astribank-inputs + context=astbank-inputs channel => 11-14 immediate=no @@ -320,6 +373,37 @@ SAMPLE CONFIGURATIONS: callerid=asreceived channel => 15-22 + Astribank 4 BRI: + + ; Assumed ports settings: + ; Ports 1,3: TE + ; Ports 2,4: NT + [channels] + switchtype = euroisdn + callerid = asreceived + + ; TE ports: + signalling = bri_cpe_ptmp + ;signalling = bri_cpe + context = from-pstn + group = 1,11 + channel => 1,2 + + group = 1,13 + channel => 7,8 + + ; NT ports: + signalling = bri_cpe_ptmp + ;signalling = bri_cpe + context = from-pstn + group = 2,12 + channel => 1,2 + + group = 2,14 + channel => 7,8 + + + See also the output of genzaptelconf for examples of mailbox and callerid, and for channel numbers that will match your specific settings. For that reason I only give the above two sample configurations. @@ -345,25 +429,28 @@ 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: +Sample dialplan (extensions.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}) - +[trunk] +; A number that begins with 9: dial it through a trunk +; (we put FXO channels and TE channels in group 0). +; The leading 9 is stripped. +exten => _9.,1,Dial(Zap/g0/${EXTEN:1}) +; dialing a number that begins with 81 will dial it through +; span 1, etc. The two leading digits are stripped. +; (Each digital span is also added to group 10+span number ). +exten => _8X.,1,Dial(Zap/g1${EXTEN:1:1}/${EXTEN:2}) + [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 +include => trunk [from-pstn] ; Calls from the PSTN enter here. Redirect calls to an IVR @@ -371,7 +458,7 @@ include => trunk-9 ; redirect calls to Zaptel channel 1: exten => s,1,Dial(Zap/1) -[astribank-inputs] +[astbank-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 @@ -382,7 +469,7 @@ 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 +; No. We did not forget the context astbank-outputs. Output ; ports only get calls from the PBX. Thus they don't need a context ; of their own. @@ -404,17 +491,23 @@ synchronization source. printing to it can change the synchronization source. Host-synchronization is currently the default but for better sound quality you should synchronize from the Astribank. -/proc/xpp/XBUS-n gives information about device number n (starting from -0). under it, /proc/XBUS-n/XPD-m gives information regarding span number +/proc/xpp/XBUS-nn gives information about device number nn (starting from +00). under it, /proc/XBUS-nn/XPD-mm gives information regarding span number m in that device. -/proc/xpp/XBUS-n/XPD-m/zt_registration is a read-write file for +/proc/xpp/XBUS-nn/XPD-mm/zt_registration is a read-write file for manually registering/unregistering the span with Zaptel. A span will register automatically when generated, though. Span unregistration may fail if some channels from the span are used (e.g: by Asterisk). Registration is by writing 1 and unregistration is by writing 0 to the file. + watch -n1 cat /proc/xpp/XBUS-00/XPD-00/summary + +This shows which ports are off-hook, which are ringing, etc. It also +shows the current audio sample in both direction, which is useful to +see if there is something going at all. + (There are a bunch of other status files under /proc/xpp/ ) -- cgit v1.2.3