Koozali.org: home of the SME Server

Problems with SME + ISDN4Linux + Asterisk

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« on: July 12, 2004, 01:57:37 PM »
Hi all,

I'm running a 6.0 SME with Asterisk (thanks to the RPMs from duncan) installed on. With SIP everything works fine, but the ISDN issue drives me crazy. The Asterisk-box I'm about to build should be a PBX that lets users place calls via SIP provider, and place+recieve calls via ISDN. The SIP part works nice, as mentioned.

It seems that the installed ISDN card (passive, tried both, a AVM Fritz PCI and some PCI card from manufacturer Sitecom) isn't available to Asterisk.

I didn't any i4l config while PCI cards should work plug&play with i4l.

Is there any known issue with (passive?) ISDN cards on SME? I found some howto for passive cards for e-smith 4.1... but thought 6.x hasn't the same problem.

Maybe switching to CAPI4Linux helps? - But thought thats to much modification to SME: replacing i4l, recompiling kernel with capi, finally adding chan_capi to Asterisk...


Perhaps someone can help me, thanks in advance!

whte_rbt

RavenIV

Problems with SME + ISDN4Linux + Asterisk
« Reply #1 on: July 13, 2004, 01:26:45 AM »
there is an article in the german "linux magazine" which handles the thema "VoIP" really good.

take a look at www.linux-magazine.de to check if the article is available online.

PS. when you are successful with VoIP and Asterisk and so on would you please give me a email or please create a how-to.

PPS. i'm german, too.

cheers

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #2 on: July 13, 2004, 01:28:41 AM »
In the meanwhile I did (parts of) the "passive ISDN card issue" howto to make hisax fit my AVM Fritz! PCI.

But with no results.

:evil:

RavenIV

Problems with SME + ISDN4Linux + Asterisk
« Reply #3 on: July 13, 2004, 01:31:35 AM »

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #4 on: July 13, 2004, 01:34:31 AM »
Quote from: "RavenIV"

PS. when you are successful with VoIP and Asterisk and so on would you please give me a email or please create a how-to.


See http://forums.contribs.org/index.php?topic=20617.0
for a basic Asterisk howto and RPMs for SME.

Everything works fine, while talking about VoIP and SIP. Only ISDN is causing trouble, in my case. Some other guys seem to have a nice life with external ISDN cards... but I'm still trying.

whte_rbt

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #5 on: July 13, 2004, 01:37:41 AM »
OK, you discovered the thread already.

I posted my questions there, perhaps someone is listening now.

rbt.

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #6 on: July 13, 2004, 01:43:47 AM »
Thank you for the tip of the current Linux Magazin issue. Nice, they have a Asterisk workshop inside. And while its german, they included a ISDN-workaround, for sure. Hopefully they don't use a SuSE box with CAPI running...

Until the papershops open again, I'm considering a bit of sleep...

  ;-)

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #7 on: July 13, 2004, 02:08:39 AM »
For the ones who would like to help, here is my config:

modem.conf:

driver=i4l
type=autodetect
dialtype=tone
mode=immediate
group=1
msn=123456
device => /dev/isdn0   ;ttyI0 &
device => /dev/isdn1   ;ttyI1 also does not work

extensions.conf:

exten => _09.,1,Dial(Modem/g1/${EXTEN})
exten => _09.,2,Congestion
exten => _09.,102,Busy


Asterisk gives me this (with variations as I try different):

"...device 'isdn0'/'ttyI0' does not exist..."
486 Busy Here

duncan

Problems with SME + ISDN4Linux + Asterisk
« Reply #8 on: July 13, 2004, 05:18:19 AM »
Mine

modem.conf

[interfaces]
context=remote
driver=i4l
language=en
type=autodetect
stripmsd=1
dialtype=tone
mode=immediate

group=1
msn=210&L*
device => /dev/ttyI0
device => /dev/ttyI1
callerid=Workshop
;incomingmsn=*

extensions.conf

[isdn]
exten => _0.,1,Dial,Modem/g1:$BYEXTENSION|120|r        ;Dial out to network via ISDN


I dont use the ISDN card (NETJet) any more. Echo problems. I remember that it wasnt recognised properly during the boot sequence and I had to fix that up. I also had to patch and recompile hisax - but that was specific to the NETJet.

The AVM cards should work sweet.

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #9 on: July 13, 2004, 10:17:41 PM »
Thank you, duncan, I believe it was something with extensions: now I get it "Ringing" or "Trying".

But the issue isn't solved: It doesen't really call a number. It says "Ringing", but nothing happens on the phone I call. Even if I unplug the ISDN card from the ISDN, its the same.

Perhaps also in my case something is wrong with hisax/i4l?

I'll keep trying, as my Asterisk does...   :-?

whte_rbt

Multiple ISDN cards now.
« Reply #10 on: July 14, 2004, 03:36:19 PM »
WORKS!

But its not over: I just put in a second ISDN card (also AVM Fritz! PCI), becasue I need more channels. Now no card is working. I have to reconfig Hisax for this, the folks at ISDN4Linux say, like "modprobe -v hisax protocol=2,2 type=27,27". -- To make it last, I should type "options hisax type=27,27 protocol=2,2" into modules.conf.

But SME is overwriting this file, it tells me. Instead, I should go, modify /etc/e-smith/templates/modules.conf/10Hisax -- This one looks like that:

{
    @lines = grep { !/^\s*options\s*hisax/ } @lines;
    my $hisax_alias = "alias char-major-43 hisax";
    unless (exists $lines{$hisax_alias})
    {
        push @lines, $hisax_alias;
    }
    my $hisax = db_get_prop($confref, 'isdn', 'HisaxOptions') || "";
    my $type = db_get_prop($confref, 'isdn', 'Type') || "";
    my $protocol = db_get_prop($confref, 'isdn', 'Protocol') || "";
    if ($type)
    {
        $hisax .= " type=$type";
    }
    if ($protocol)
    {
        $hisax .= " protocol=$protocol";
    }
    if ($hisax)
    {
        push @lines, "options hisax $hisax";
    }
    "";
}


Help! - I've got no idea about customizing this piece of stuff.

whte_rbt

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #11 on: July 14, 2004, 03:42:36 PM »
GOT IT!

I was brave, studied the code a bit, and tried.

/sbin/e-smith/config isdn Type 27,27
/sbin/e-smith/config isdn Protocol 2,2

is required to change the values in the template.

Am I becoming a real SME professional now?  :lol:

rbt.

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #12 on: July 14, 2004, 03:54:19 PM »
sorry, its

/sbin/e-smith/config setprop isdn Type 27,27
/sbin/e-smith/config setprop isdn Protocol 2,2

of course.

djohen

Problems with SME + ISDN4Linux + Asterisk
« Reply #13 on: July 15, 2004, 01:13:08 PM »
I used this stuff to install my fritz pci isdn card
maybe it helps.

http://www.voip-info.org/tiki-index.php?page=Asterisk%20AVM%20Fritz%20CAPI%20Driver%20Install

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #14 on: July 15, 2004, 04:34:23 PM »
Thanks, but I've got it working now.

Using CAPI would be a nice thing, but SME comes with I4L, so you have to replace i4l utils with capi2util, adding a module or, as described in the VoIP-info howto, to recompile your kernel. Then, I have a SMP machine, recompiling the SMP kernel might cause trouble.

I simply don't wanted to change so much in SME, as it comes aleady with ISDN support.

And it works now, while don't having any problems with latency or echo, like some others say using I4L.

whte_rbt.

hnagin

Problems with SME + ISDN4Linux + Asterisk
« Reply #15 on: September 16, 2004, 04:00:00 PM »
Dear whte_rbt

I am trying to get Asterisk working with ISDN. Since you have have it working, can you share with me you config files.

I have the contrib running and I can connect but I am having problems with geting the config right.

Thanks
Hittendra

guest22

Problems with SME + ISDN4Linux + Asterisk
« Reply #16 on: September 16, 2004, 11:09:24 PM »
Why are you trying modem.conf with a AVM Fritz????

The AVM Fritz is considered a zaptel device handled by capi2, not by modem. Why? Cause I have 3+ running AVM Fritz! cards running in 1 box handled by capi2.

www.junghanns.net

Schuss ;-)

hnagin

Problems with SME + ISDN4Linux + Asterisk
« Reply #17 on: September 17, 2004, 12:34:05 PM »
Hello

As I understand it SME does not come with CAPI. This needs to be complied and installed. I am tring to avoid that if possible.
Rolling Eyes

Regards
Hittendra

guest22

Problems with SME + ISDN4Linux + Asterisk
« Reply #18 on: September 17, 2004, 06:28:19 PM »
Specific drivers need to be compiled... :-(

If you need them, reply with a request and I will make them available.

RequestedDeletion

organetic

AVM Fritz PCI on SME Asterisk PBX
« Reply #19 on: September 22, 2004, 09:47:49 PM »
I'm just installing an AVM Fritz PCI v2 card...

Could anyone tell me how can I use it with Asterisk on SME 6.0.1? Do I need specific drivers like RequestedDeletion mentioned? If so, how can it be done?

Best regards and keep up the good work!

Nuno

guest22

Problems with SME + ISDN4Linux + Asterisk
« Reply #20 on: September 22, 2004, 09:56:50 PM »
Go here: http://www.avm.de/en/Downloads/index.php3

Download the linux drivers and compile them. Ofcourse you need the dev-tools for 6.0.1-1.

RequestedDeletion

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #21 on: September 27, 2004, 11:22:49 PM »
Quote from: "hnagin"
I am trying to get Asterisk working with ISDN. Since you have have it working, can you share with me you config files.
I have the contrib running and I can connect but I am having problems with geting the config right.


Hi, sorry for answering so late, there wasn't time for me to post earlier...

First of all, use voip-info.org -- you have to understand the basics of extensions, sip and modem.conf before using Asterisk. - You can only get along with him when you're able to talk to him. That was my final experience.

1. modify inid.d for Hisax (the driver for passive ISDN cards) to fit your card (Two AVM Fritz PCI in my case):

/sbin/e-smith/config setprop isdn Type 27,27
/sbin/e-smith/config setprop isdn Protocol 2,2

for a single card:

/sbin/e-smith/config setprop isdn Type 27
/sbin/e-smith/config setprop isdn Protocol 2

If you have a different card, google for the Hisax type code.

2. modem.conf

context=default
driver=i4l
type=autodetect
dialtype=tone
mode=ring

group=1
msn=921292
incomingmsn=921293,921292,921291,9233120,9233121,9233122,2957
outgoingmsn=921292
device => /dev/ttyI2
device => /dev/ttyI3

group=2
msn=921289
incomingmsn=921289,921290,921716
outgoingmsn=921289
device => /dev/ttyI0
device => /dev/ttyI1

3. extensions.conf

exten => _98.,1,Answer
exten => _98.,2,Playback(waitconnect)
exten => _98.,3,Dial(Modem/g1:${EXTEN:2},240,Tm)
exten => _98.,4,Dial(Modem/g2:${EXTEN:2},240,Tm)
exten => _98.,5,Playback(unavail)
exten => _98.,6,Hangup

The _98. wants numbers beginning with 98 to use the ISDN groups to dial out. To use the number that is dialled by the client but substract the two prefix digits to give Hisax only the number to dial via ISDN, I say ${EXTEN:2}. Thats also a famous source for malfuncions. And be aware of the stripmsd tag in modem.conf, it can also be used to substract digits.

Hope this helps.

rabbit

rulle_mus

capi confused
« Reply #22 on: January 18, 2005, 12:13:13 PM »
Hi,

Is the hisax driver that comes with SME 6.0-01 sufficient to fire up my Fritz card with i4l? as described by rabbit.

e.g. issuing the following:

modprobe hisax
/sbin/e-smith/config setprop isdn Type 27
/sbin/e-smith/config setprop isdn Protocol 2  

edit modem.conf and extensions.conf

should be enough to use my Fritz with Asterisk on SME?

Regards, Mus

whte_rbt

Problems with SME + ISDN4Linux + Asterisk
« Reply #23 on: January 18, 2005, 12:33:09 PM »
Its a bit of time ago now for me, but yes, with the 1.0 Asterisk release it should work proper on a Fritz! passive device and the i4l hanging around with SME.

There's only one thing: with some clients you get DTMF recognitions you don't want do have (caused by normal speaking). I4l is a bit tricky on this. For example, when using the Grandstream BudgeTone, you have to configure the device to send DTMFs not as SIP but RFC-XXX. Choosing SIP (for DTMF management) causes hangups with this phone.

Just follow the instructions above in this thread. They reconstruct my final and successful investments to this issue.

For about half a year my company is phoning with Asterisk exclusively (ISDN & SIP provider) and everyone's happy...

Great stuff, after having some nights configuring...