Asterisk and ISDN4Linux and a HFC-S

Currently we are using an Asterisk PBX server at work to process or incoming calls in queues and to support logging and make things automated. Our setup consists of a Debian Linux server with an HFC-S ISDN PCI card. We use ISDN4Linux to interface the ISDN towards Asterisk.

While we where setting this up we discovered a little problem with this setup. The problem is that when a caller hangs up while there is some automated playback and the next caller calls it will hear some remains of this automated playback. The Asterisk Wiki did not have anything to tell us about this issue. However a Google on 'isdn4linux vbox buffer' did reveil us with the following patch for ISDN4Linux inside the kernel:
Please change the code in hfc_pci.c function hfcpci_clear_fifo_tx :

bzt->za[MAX_B_FRAMES].z2 = bzt->za[MAX_B_FRAMES].z1;
in
bzt->za[MAX_B_FRAMES].z2 = bzt->za[MAX_B_FRAMES].z1 -1;



This will solve the problem. Asterisk will function correctly afterwards.


UPDATE 06-01-05
After getting our Cisco 7960 IP Phones (we use them in SIP mode) we discovered another problem that is troubling Asterisk in combination with ISDN4Linux.
The problem is that we are unable to send outgoing DTMF tones to the PSTN. The fix consists out of the following patch to isdn_tty.c of the Linux kernel:

--- /root/isdn_tty.c 2003-11-05 18:02:49.000000000 +1100
+++ isdn_tty.c 2003-11-05 18:08:46.000000000 +1100
@@ -133,9 +133,9 @@
if (info->online) {
r = 0;
#ifdef CONFIG_ISDN_AUDIO
- isdn_audio_eval_dtmf(info);
- if ((info->vonline & 1) && (info->emu.vpar[1]))
- isdn_audio_eval_silence(info);
+ //isdn_audio_eval_dtmf(info);
+ //if ((info->vonline & 1) && (info->emu.vpar[1]))
+ // isdn_audio_eval_silence(info);
#endif
if ((tty = info->tty)) {
if (info->mcr & UART_MCR_RTS) {
@@ -190,10 +190,10 @@
#ifdef CONFIG_ISDN_AUDIO
ifmt = 1;

- if ((info->vonline) && (!info->emu.vpar[4]))
- isdn_audio_calc_dtmf(info, skb->data, skb->len, ifmt);
- if ((info->vonline & 1) && (info->emu.vpar[1]))
- isdn_audio_calc_silence(info, skb->data, skb->len, ifmt);
+ //if ((info->vonline) && (!info->emu.vpar[4]))
+ // isdn_audio_calc_dtmf(info, skb->data, skb->len, ifmt);
+ //if ((info->vonline & 1) && (info->emu.vpar[1]))
+ // isdn_audio_calc_silence(info, skb->data, skb->len, ifmt);
#endif
if ((info->online < 2)
#ifdef CONFIG_ISDN_AUDIO

UPDATE 06-01-2005
I discovered today that Skinny IP phones will not hear a ringing tone when calling to another extension using Asterisk. Here is a patch that will fix this problem (quick and dirty):
Apply this to channels/chan_skinny.c :

@@ -1715,14 +1756,17 @@
}
switch(ind) {
case AST_CONTROL_RINGING:
- if (ast->_state == AST_STATE_RINGING) {
+ ast_verbose(VERBOSE_PREFIX_3 "State AST_CONTROL_RINGINGn");
+ // if (ast->_state == AST_STATE_RINGING) {
+ ast_verbose(VERBOSE_PREFIX_3 "State AST_STATE_RINGINGn");
if (!sub->progress) {
transmit_tone(s, SKINNY_ALERT);
transmit_callstate(s, l->instance, SKINNY_RINGOU
T, sub->callid);
sub->ringing = 1;
+ ast_verbose(VERBOSE_PREFIX_3 "Started Ringingn"
);
break;
}
- }
+ // }


Currently we are running the following patch on Asterisk CVS HEAD.


Would you recommend Asterisk for other companies or is the setup difficult?

Tim Stoop () (URL) - 04 January '05 - 18:21

Actually the setup is quite easy if you have a dedicated Linux box with a HFC-S PCI ISDN card (an E-Tech PCTA128 card will suffice). Configuration examples will be presented on request :)

Cliff () (URL) - 04 January '05 - 18:36

I realy would like to have some Configuration examples of your hfc card setup. And how did you compile zaptel?

Didier Geheniau () - 08 June '05 - 16:44


Name:  
Remember personal info?

Email:
URL:
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.