Hi,

I've problems getting the NT-mode running with asterisk:

My hardware is a single bus HFC-based card that worked with mISDN and
zaphfc. The phone I use for testing is a self powered Siemens DECT
phone on the bus. Cabling and termination should work because they
worked with zaphfc but that was a couple of month ago.

Here are my results:

If I place a call from the phone syslog shows activity:

Jul 30 15:35:53 aegir kernel: hfc-e1: HFC-E1 Driver loading
Jul 30 15:35:54 aegir kernel: NET: Registered protocol family 30
Jul 30 15:35:54 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:role set to NT
Jul 30 15:35:54 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:chan[D] connecting 
to 000006
Jul 30 15:35:54 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:chan[D] channel 
opened
Jul 30 15:35:54 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:chan[D] channel 
started
Jul 30 15:35:54 aegir kernel: lapd: NETDEV_UP visdn0
Jul 30 15:35:54 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:layer 1 state = G0 
=> G2
Jul 30 15:35:54 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:layer 1 state = G2 
=> G3
Jul 30 15:35:54 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:enabled
Jul 30 15:36:12 aegir kernel: device visdn0 entered promiscuous mode
Jul 30 15:36:12 aegir kernel: audit(1154266572.496:7): dev=visdn0 prom=256 
old_prom=0 auid=4294967295
Jul 30 15:36:24 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:chan[D] RX (f1=10, 
f2=1f, z1=0009, z2=01ff)
 len 11: fcff030f733001ff28fc00
Jul 30 15:36:24 aegir kernel: lapd: visdn0: TEI request
Jul 30 15:36:24 aegir kernel: lapd: visdn0: Assigning TEI 126
Jul 30 15:36:25 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:layer 1 state = G3 
=> G4
Jul 30 15:36:25 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:layer 1 state = G4 
=> G1
Jul 30 15:36:37 aegir kernel: device visdn0 left promiscuous mode

but the phone shows me an error and signals busy.

on subsequent calls (not freshly loading the module) I notice:
Jul 30 15:47:09 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:layer 1 state = G1 
=> G2
Jul 30 15:47:09 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:layer 1 state = G2 
=> G3
Jul 30 15:47:09 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:chan[D] RX (f1=11, 
f2=10, z1=0014, z2=000a) len 11: fcff030f4aa201ff787500
Jul 30 15:47:09 aegir kernel: lapd: visdn0: TEI request
Jul 30 15:47:09 aegir kernel: lapd: visdn0: Assigning TEI 64
Jul 30 15:47:11 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:chan[D] RX (f1=12, 
f2=11, z1=001f, z2=0015) len 11: fcff030f747701ff7a2100
Jul 30 15:47:11 aegir kernel: lapd: visdn0: TEI request
Jul 30 15:47:11 aegir kernel: lapd: visdn0: Assigning TEI 65
Jul 30 15:47:12 aegir kernel: hfc-pci: pci-0000:0a:06.0:st:chan[D] RX (f1=13, 
f2=12, z1=002a, z2=0020) len 11: fcff030f1d2c01ffb8eb00
Jul 30 15:47:12 aegir kernel: lapd: visdn0: TEI request
Jul 30 15:47:12 aegir kernel: lapd: visdn0: Assigning TEI 66

before the phone shows an error. Asterisk is up and running and the device
shows up in asterisk:

aegir*CLI> show visdn interfaces
Interface  Role Mode TEI Status        Calls
visdn0     NT   P2MP     Online        0

I'll attach my config-files - I'm running with "patch-674" on a 2.6.17
kernel with the patches, that circled on the mailing-list.

What am I doing wrong?

Thanks

Leif


PS: I've debianized visdn for my testing, I'll release the patches if
my config is working.
+++ mod/modules/core/core_main.c
@@ -17,6 +17,7 @@
 #include <linux/cdev.h>
 #include <linux/kdev_t.h>
 #include <linux/device.h>
+#include <linux/notifier.h>
 
 #include <kernel_config.h>
 
@@ -74,22 +75,26 @@
 EXPORT_SYMBOL(visdn_system_device);
 
 static struct notifier_block *visdn_notify_chain;
+static struct raw_notifier_head visdn_notify_chain_head;
 
 int visdn_register_notifier(struct notifier_block *nb)
 {
-       return notifier_chain_register(&visdn_notify_chain, nb);
+       visdn_notify_chain_head.head = visdn_notify_chain;
+       return raw_notifier_chain_register(&visdn_notify_chain_head, nb);
 }
 EXPORT_SYMBOL(visdn_register_notifier);
 
 int visdn_unregister_notifier(struct notifier_block *nb)
 {
-       return notifier_chain_unregister(&visdn_notify_chain, nb);
+       visdn_notify_chain_head.head = visdn_notify_chain;
+       return raw_notifier_chain_unregister(&visdn_notify_chain_head, nb);
 }
 EXPORT_SYMBOL(visdn_unregister_notifier);
 
 int visdn_call_notifiers(unsigned long val, void *v)
 {
-       return notifier_call_chain(&visdn_notify_chain, val, v);
+       visdn_notify_chain_head.head = visdn_notify_chain;
+       return raw_notifier_call_chain(&visdn_notify_chain_head, val, v);
 }
 EXPORT_SYMBOL(visdn_call_notifiers);
 


--- orig/modules/vgsm/card.c
+++ mod/modules/vgsm/card.c
@@ -472,7 +472,7 @@
        if (test_bit(VGSM_MODULE_STATUS_RUNNING,
                                &module->status)) {
                for(i=0; i<msg->numbytes; i++) {
-                       if (module->tty->flip.count >=
+                       if (module->tty->max_flip_cnt >=
                                        TTY_FLIPBUF_SIZE)
                                tty_flip_buffer_push(
                                        module->tty);



<netdev visdn0>
  protocol lapd
  role NT
  mode P2MP
</netdev>

<port st0>
  attribute role NT
  attribute timer_t1 1500
  attribute timer_t3 1500

  <chan D>
    connectmodule netdev visdn0
  </chan>

</port>
;
; vISDN configuration file for Asterisk's visdn_chan channel driver
;
; The [general] section is reserved for parameters which are driver-wide
;
; The [global] section contains parameters definition which is applied by
; default to all the interfaces but may be overridden in interface-specific
; sections.
;
; All the other sections should be named with the vISDN interface names defined
; in /etc/visdn/device-* configuration files.
; If a section does not correspond to a real, live, interface it will be
; read anyway but its status will be marked as "UNUSED" in
; "show visdn interfaces" output, ready for when the interface comes up.
;
; Alternatively, if prefixed by hungroup: an entry describes a huntgroup.
; The hunting method is specified by:
;
; mode = sequential
;               (sequential | rotary)
;       Type of hunting to perform in the hungroup
;
; members = ""
;       List the members (interface names) belonging to the huntgroup.
;       The order is preserved in the hunting process.
;
; Here follow the configuration directives available in [global] and
; interface-specific sections. "role" indicates for which interface role
; the directive is meaningful.
;
; tei = dynamic
;       TEI to be used on the interface. If set to dynamic it will fall back
;       to TEI 0 when used on P2P interfaces. It is ignored in NT P2MP
;       interfaces.
;       ## role: network, user
;
; network_role = private
;               (user | private | local | transit | international)
;       The role of the interface in the ISDN network. Normally you would use
;       "private" to indicate a private branch. If you ever want to be seen as
;       the public operator you should use "local". "transit" and
;       "international" are mostly unused.
;       ## role: network, user
;
; outbound_called_ton = unknown
;               (unknown | international | national | network_specific |
;               subscriber | abbreviated)
;       Type of number used for called numbers (outbound calls)
;       ## role: network, user
;
; force_outbound_cli = ""
;       If set, forces the outbound CLI number to the one specified. See also
;       force_cli_type_of_number to set the corresponding ton, otherwise the
;       one transported by Asterisk is used.
;       ## role: network, user
;
; force_outbound_cli_ton = no
;               (no | unknown | international | national | network_specific |
;               subscriber | abbreviated)
;       Type of number used for caller id. Some network require you to use a
;       specific type of network to correctly accept the caller_id.
;       ## role: network, user
;
; overlap_sending = Yes
;       Enables/disables overlap dialing. Disabiling overlap dialing means
;       that the called party number in the SETUP message is considered
;       complete. If existant it will be connected, otherwise the call will
;       be rejected. Note that "sending" means that the user is sending digits.
;       ## role: network, user
;
; overlap_receiving = No
;       Enables/disables overlap receiving on the interface. Overlap receiving
;       is used to implement DID thru PBXs.
;       ## role: network, user
;
; context = visdn
;       Context for incoming calls
;       ## role: network, user
;
; language = ""
;       Language associated to inbound calls
;       ## role: network, user
;
; trans_numbers = ""
;       Called numbers for which transparent bearer capability/high layer
;       compatibility passing is supported.
;       ## role: network, user
;
; clip_enabled = Yes
;       Enabled Calling Line Identification Presentation service.
;       ## role: network
;       
; clip_override = No
;       Override Calling Line Presentation Restriction and always present
;       the CLI.
;       ## role: network
;       
; clip_default_name = ""
;       Name applied to CLIP information coming from the network
;       Default:
;       ## role: network
;
; clip_default_number = ""
;       When the user doesn't specify the calling line identification or
;       specifies an invalid number, this CLI is taken.
;       ## role: network
;
; clip_numbers =
;       Comma-separated list of numbers that will pass network screening.
;       Usual asterisk-style matching is supported. NOTE: clip_numbers should
;       contain clip_default_number.
;       ## role: network
;
; clip_special_arrangement = No
;       Only meaningful in network mode. The user-specified CLI is passed
;       thru the network as user-provided, not-screened.
;       ## role: network
;
; clir_mode = default_off
;               (off, default_on, default_off, on)
;       Calling Line Identification Restriction service applied by the
;       network on incoming calls. Available modes:
;
;       "off"           : Restriction is never applied
;       "default_on"    : Restriction is specified by the user, otherwise On
;       "default_off"   : Restriction is specified by the user, otherwise Off
;       "on"            : Restriction is always applied
;
;       ## role: network
;
; cli_rewriting = no
;       Change the type of number of incoming CLI to unknown and rewrite
;       the number adding the corresponding prefix specified below.
;       ## role: network, user
;
; national_prefix = ""
;       Prefix to prepend when rewriting numbers of type "national"
;       ## role: network, user
;
; international_prefix = ""
;       Prefix to prepend when rewrtiting numbers of type "international"
;       ## role: network, user
;
; network_specific_prefix = ""
;       Prefix to prepend when rewrtiting numbers of type "network_specific"
;       ## role: network, user
;
; subscriber_prefix = ""
;       Prefix to prepend when rewrtiting numbers of type "subscriber"
;       ## role: network, user
;
; abbreviated_prefix = ""
;       Prefix to prepend when rewrtiting numbers of type "abbreviated"
;       ## role: network, user
;
; tones_option = Yes
;       Enables tones generation for terminals (most of them) which do not
;       generate tones by theirselves.
;       ## role: network
;
; autorelease_dlc = 10
;       Release the DLC after the specified timeout (in seconds).
;       A value of '0' disables the autorelease mechanism.
;       ## role: network, user
;
; call_bumping = No
;       In network role sends SETUP requests with "no channel available"
;       instead of rejecting the call.
;       Usage in user role is not supported.
;       ## role: network, user
;
; echocancel = Yes
;       Enable line echo cancellation on the interface.
;
; echocancel_taps = 256
;       Echo cancellation filter length (in samples). Since the ISDN channels
;       use a 8 KHz sampling rate each sample lasts 125us. A 256-taps echo
;       canceller can cancel no more than 32ms of echo (somethat less, due to
;       limited line bandwidth). The taps value must be a power of two. Keep
;       in mind that with many taps the computational load grows and
;       convergence becomes more and more difficult.
;
; T301 => T322
;       Configure Layer3/CCB timers. For a description of the timers meaning
;       refer to ETS 300 102 Table 9.1 and successive modifications.
;       Avoid to modify them if you don't know what you're doing.
;       ## role: timer dependent
;

[general]

[global]
network_role = local
tones_option = no
language = en
outbound_called_ton = unknown
force_outbound_cli =
force_outbound_cli_ton = no
;clir_mode = default_off
cli_rewriting = No
national_prefix = 0
international_prefix = 00
network_specific_prefix =
subscriber_prefix =
abbreviated_prefix =
overlap_sending = Yes
overlap_receiving = No
autorelease_dlc = 10
call_bumping = No

[visdn0]
tei = dynamic
context = visdn-test-incoming
outbound_called_ton = unknown
force_outbound_cli =
force_outbound_cli_ton = no
clip_default_name = vISDN
clip_default_number = 300
clip_numbers = _X.

_______________________________________________
Visdn-hackers mailing list
[email protected]
https://mailman.uli.it/mailman/listinfo/visdn-hackers

Reply via email to