Where is Step-by-Step DAHDI Installation for 2.6.x

jknudsen
Posts: 74
Member Since:
2008-12-18

I know the first thing everyone is gonna say is "SEARCH THE FORUMS!". However, I have searched the forums, and I have found a LOT about this issue, but no where that I have looked have I found Step-by-Step instructions to install DAHDI on Trixbox 2.6.x.

The reason for upgrading is the well complained about Zaptel + Digium + Hardware Echo Cancellation issue involving lack of duplex audio. My system is currently in production, I do have a backup which I will test everything on, but I need a solution that is proven and stable. I have no desire to upgrade to 2.8.x and it's to late to change to AsteriskNOW. I understand that freepbx in Trixbox 2.6.x is compatible with DAHDI and all that. I am comfortable in the command prompt, but by no means would I be willing to give up any functionality of my FreePBX and modules associated to it, makes life so much easier.

So, cut dry what I am looking for is a hand holding, Idiot's Dummy guide for installing DAHDI and any required dependencies to a trixbox 2.6.x system, that is completely up to date (via yum update), without effecting any pre-existing functions. (It sounds like i have to update asterisk itself as well, even after the yum update)

Please help



SkykingOH
Posts: 9681
Member Since:
2007-12-17
Build Asterisk and DAHDi from source

Unfortunately the procedure is not as cut and dry as you would like it to be.

When done you will no longer be able to update Asterisk from yum, I don't think this is a concern to you.

The procedure is essentially -

  1. - Install Build Environment on target machine (kernel headers, gcc, bison etc)
  2. - Download Asterisk, Asteerisk Add-ons and DAHDI complete from Digium
  3. - Untar source in build directories
  4. - Configure software
  5. - Compile software (make)
  6. - Install software
  7. - Set FreePBX for DAHDI compat mode (might as well update to FreePBX 2.6 at the same time)

I know it seems as if we are holding back information however it is not a 1-2-3 process.

I have sent you a Private Message with another suggestion.

--

Scott

aka "Skyking"



Axeman3d
Posts: 29
Member Since:
2009-07-17
building a DAHDI equipped system

Are you telling me I bought a Digium card and it wont actually work with Trixbox correctly? D'oh!

Ah, not good. I have just this moment downloaded and installed the latest ISO of Trixbox and installed it on a system. I have then plugged in a single span E1 Digium card (the TE122B) and am looking to get it up and linked to my legacy PBX. I'm a nearly complete newb with Linux, hate it with a passion, but I need to get this running. I followed the step by step install guide from Digium but it's not happening. When i try the 'make' commands on the drivers it fails telling me that I do not have the source of a certain kernel version (2.6.18).

If I simple get a hold of this kernel from www.kernels.org will it work, maybe? The step-by-step also includes installing Asterisk, but I assume doing so would break Trixbox, so I didn't. I thought by buying Digium it would be a breeze, plug and play almost. Apparently not.

Kenny



jfinstrom
Posts: 2013
Member Since:
2007-03-07
umm no it will however work

umm no it will however work with zaptel, infact the drivers are probably already there... try running setup-pstn see what happens

--



Axeman3d
Posts: 29
Member Since:
2009-07-17
I ran setup PSTN and I've

I ran setup PSTN and I've also installed all sorts of stuff recommended in Wikis and tutorials. When I run dahdi_tool I can see the card, and it says I've got 31 lines configured and ready, but 0 active. Here's the back story...

Installed the latest Trixbox ISO onto a PC for testing, and installed a Te122B Digium card to link it directly into our legacy PBX, a horrible old HiCom 300E. The HiCom link was configured as an E1 pri link providing 30 channels to a Samsung Gateway I was using previously, but it went faulty. It's routing about 80 extension numbers to whatever I plug on the end of it. I've unplugged the rj45 lead from the samsung, stuck it in the digium card and all I get is the flashing red light telling me the digium card cant see the other end. I used an RJ45 reversal adaptor in case it needed a reversal but it made no difference. I've set the span setting and configs to match normal euro E1 settings, but basically the card isn't seeing anything.

My problem is that I dont know if it's a physical problem or a driver problem now. When I try to install the latest Dahdi drivers the install fails when I try the make install command, because it's looking for a kernel source file that doesn't exist, and in the wrong place. I've installed the latest kernel files and put a link in to point to them, but it seems to want the older resource files only. I'm now at the stage where I'm going to fart around trying different RJ45 wiring configurations while I experiment with kernel files. Any ideas?



jfinstrom
Posts: 2013
Member Since:
2007-03-07
Honestly sounds like a

Honestly sounds like a configuration problem, setup-pstn (dahdi_gencong/genzaptelconfig) sets up a generic E! which enables CRC4. If your line does not have CRC4 it will be red. The configs generated are set as most common for the guy who wrote the script. We modified the script to write the files in a fashion that is most common for us. That said we install thousands of boxes so if your quantity is not that high no need to rewrite any code simply tune the generated configurations.

On Zaptel:
/etc/zaptel.conf
/etc/asterisk/zapata-auto.conf OR /etc/asterisk/zapata-channels.conf
Make sure at the bottom of your /etc/asterisk/zapata.conf you have #include zapata-auto.conf OR #include zapata-channels.conf

On DAHDI:
/etc/dahdi/system.conf
/etc/asterisk/dahdi-channels.conf
Make sure at the bottom of your /etc/asterisk/chan_dahdi.conf you have #include dahdi-channels.conf

NOTE: # in #include is NOT a comment it makes the keyword `include' a directive, DO NOT REMOVE THE #

--



SkykingOH
Posts: 9681
Member Since:
2007-12-17
If the HiCom is expecting

If the HiCom is expecting timing from the Asterisk box you need to modify the config to reflect that.

If the card shows up in dahdi_tool what do you see in Asterisk with dahdi show channels.

Get the stack working one layer at a time, don't jump around. Once dahdi sees the channels in dahdi_tool focus on the etc/asterisk/chan_dhadi.conf to make Asterisk see the channels.

You can check the Asterisk sees DAHDI with the dahdi show status command.

--

Scott

aka "Skyking"



Axeman3d
Posts: 29
Member Since:
2009-07-17
Well, some progress here. I

Well, some progress here. I had a fault in the cable module at one end, so I had no reversal. I've replaced the module and the red light on the T122 card was instantly replaced with a yellow light, which cheered me up no end. I've now played with the /etc/dahdi/system.conf and altered the span settings and the Dahdi_tool is now saying this...

I need to get a hang of the config files now, but at least the physical is working. I have no Zapata config files apart from zapata_additional and zapata.template so I'm assuming zapata is now actually Dahdi and it's just the dahdi files I need to alter, right? I'll go see what tutorials I can find on them.

for the record, my files read thus. If you see a glaring problem please let me know. I'm off to try and educate myself some more.

CHAN_DAHDI.CONF
[trunkgroups]
switchtype=euroisdn
signalling=pri_cpe
context=incoming
echocancel=yes
channel=>1-15,17-31

[channels]
language=en
group=0
context=incoming
signalling=fxs_ks
rxwink=300

DAHDI_CHANNELS.CONF
; Span 1: WCT1/0 "Wildcard TE122 Card 0" (MASTER) HDB3/CCS/CRC4 REDClockSource
group=0,11
context=incoming
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31

SYSTEM.CONF
span=1,0,0,ccs,hdb3,crc4
# termtype: te
bchan=1-15,17-31
dchan=16
echocanceller=mg2,1-15,17-31

loadzone =uk
defaultzone =uk



SkykingOH
Posts: 9681
Member Since:
2007-12-17
You did not answer my

You did not answer my question regarding timing. That is why you have yellow alarms (the span is taking errors)

Your contexts are wrong.

You have two choices for context:

1 - from-internal

This will allow the HiCOM to access the internal dial plan and dial extensions directly

2 - from-pstn

This will utilize the inbound routes module and direct the calls to programmed routes based on CID and DNIS

--

Scott

aka "Skyking"



Axeman3d
Posts: 29
Member Since:
2009-07-17
Sorry Scott, I cant answer

Sorry Scott, I cant answer the timing question as I have not yet received info on the Siemens configuration. We have to raise a case and request the info from Siemens support, which is chronic. Also you never said which particular config file I had the context wrong in. I have played around with the span settings trying to get a hit (now at span=1,1,0,ccs,hdb3,crc4), and I now have the dahdi_tool saying the following...

I assume the IRQ thing is a hardware issue, which shouldn't impact performace directly. I have no errors otherwise, but I have yet to see an active channel and I have no clue what the lines from the Tx/Rx areas actually represent. If I run dahdi show channels I get all the channels in service with context as 'from-internal'. I assume that once I get the trunk and routing set up correctly I'll see channels marked as active, but until then it will remain zero?

What is vexing me is how to actually set up the trunk in Trixbox. I have only ever set up SIP trunks with it before, not a Zaptel/DAHDI one, so I'm not too sure if I'm on the right track. The identifier defaults to g0 in the GUI, and says that the group or channel name is defined in zapata.conf, which I understand is actually now /etc/dahdi/system.conf. I have no group or channel identifier in there, should it be?



SkykingOH
Posts: 9681
Member Since:
2007-12-17
If you have the channels

If you have the channels showing in Asterisk as from-internal you are done.

You can also do a 'pri show spans'

g0 is group 0 and should include all the trunks. The group number is also displayed in the show channels (I think).

--

Scott

aka "Skyking"



jfinstrom
Posts: 2013
Member Since:
2007-03-07
Just a note, interrupts flow

Just a note, interrupts flow at a rate of 1000/second so 43 is bad but relatively non existant, These misses could have been something wrong with the bus durring initialization but if the number is not climbing I would ignore it.

--



Axeman3d
Posts: 29
Member Since:
2009-07-17
Thanks for sticking with

Thanks for sticking with guys, I know it's a pain...

James, the IRQ failures never changes, always 23 so it's not particularly a worry. Todays update is that a PRI SHOW SPANS gets me the message PRI Span 1/0: Provisioned, Down, Active. The output of the full command is...

in1gravop001*CLI> pri show span 1
Primary D-channel: 16
Status: Provisioned, Down, Active
Switchtype: EuroISDN
Type: Network
Window Length: 0/7
Sentrej: 0
SolicitFbit: 0
Retrans: 0
Busy: 0
Overlap Dial: 0
Logical Channel Mapping: 0
T200 Timer: 1000
T203 Timer: 10000
T305 Timer: 30000
T308 Timer: 4000
T309 Timer: -1
T313 Timer: 4000
N200 Counter: 3

When I run a debug on it all I get are SABME packets heading from the card to the Siemens PBX, but nothing coming in from the PBX. If I attempt to call outwards Asterisk attempts to route it to the PBX via the link, cant get through and fails due to all circuits busy. Likewise if I try to call an extension on the Asterisk box, the Siemens returns an engaged tone.

I've been messing with different signalling types and setting to no avail, I can make no difference. I also cant find any references or tutorials on these context files showing options and explanations, which would be very handy. Siemens want cash to even log in to their switch and tell me what the settings are on their end, so I'm awaiting clearance from my boss on that one. Am I missing something obvious here?



Astrosmurfer
Posts: 643
Member Since:
2009-12-28
I'm no expert but, do see

I'm no expert but, do see something that causes me to have an opinion. It still sounds like a timing or signaling issue. I see in the configs that you posted that your signaling is set to signalling = pri_cpe making it an FXO port which is the correct setting when you are receiving the trunk from the phone company. It is also very likely the setting on the HiCom's interface. They can't both be FXO ports so try switching the Te122B to FXS.

Try changing the signaling type in chan_dahdi.conf and dahdi_channels.conf to signalling=pri_net and see if you can achieve sync.

That's my 2 cents. Now, I'm out of money.

Edit: Changed typo from fxs_ks to pri_net as per manual



SkykingOH
Posts: 9681
Member Since:
2007-12-17
Astrosmurf has his terms

Astrosmurf has his terms confused.

Change fro pri_net to pri_cpe

FXO/FXS is Channel Associated Signalling

--

Scott

aka "Skyking"



Astrosmurfer
Posts: 643
Member Since:
2009-12-28
Confused is a common state

Confused is a common state for me but, he already has his config set to pri_cpe and it doesn't work. He's also got it configured to send timing span=1,0,0,ccs,hdb3,crc4 which would be appropriate for pri_net.

Try pri_net and then tell me I'm wrong.



SkykingOH
Posts: 9681
Member Since:
2007-12-17
This is what I meant was

This is what I meant was backwards:

"making it an FXO port which "

I thought he had it set to pri_net - Between the two of us we will get him sideways.

Ignore my ramblings

--

Scott

aka "Skyking"



Axeman3d
Posts: 29
Member Since:
2009-07-17
I have tried pri_net and

I have tried pri_net and pri_cpe, I have tried setting the timing in the span to 0 and 1, and I'm still not getting there. I'll spend today going through all the permutations that I can think of and see if any of them make a difference to the link. I'll let you know what happens.



SkykingOH
Posts: 9681
Member Since:
2007-12-17
Are you not able to check

Are you not able to check provisioning on the other system?

Make sure you use a T1 crossover cable.

--

Scott

aka "Skyking"



jfinstrom
Posts: 2013
Member Since:
2007-03-07
note a t1 crossover is NOT

note a t1 crossover is NOT the same as an Ethernet crossover, That said if he had the wrong cable, or timing then he would be in alarm.

For giggles go in to the Asterisk CLI and type `pri intense debug span 1`

post the output

--



SkykingOH
Posts: 9681
Member Since:
2007-12-17
Quote: For giggles go in to
Quote:
For giggles go in to the Asterisk CLI and type `pri intense debug span 1`

And please use the code tags if you expect anyone to actually read it.

--

Scott

aka "Skyking"



Axeman3d
Posts: 29
Member Since:
2009-07-17
I fixed the cable issue

I fixed the cable issue already, I was using a crossover adaptor but it had gone faulty so I had to chop it and put on a new plug. No physical alarms now. The other end is a Siemens switch which is under a support contract, meaning Siemens have the passwords and wont give me them to check what the other end is doing. I have to raise a case with Siemens which will cost us a minimum of £180 for the first hour and £90 for every hour afterwards, and I have to get clearance from my boss to spend that cash first. I will start the process if I get no luck today.

I've done an intensive debug already, output is a regular as clockwork SABME packet being sent out towards the Siemens PBX. It reads the same every time...

Unnumbered Frame:
SAPI: 00 C/R: 0 EA: 0
TEI: 000 EA: 1
M3: 3 P/F: 1 M2: 3 1: 3 [ SABME (set asynchronous balanced mode extended) ]



jfinstrom
Posts: 2013
Member Since:
2007-03-07
SABME = hello world I am

SABME = hello world I am here someone give me some love.....

The other end is not showing the love....

--



Axeman3d
Posts: 29
Member Since:
2009-07-17
Agreed, it's reaching out

Agreed, it's reaching out and getting nothing. I can loop the link up with the Dahdi_tool and Asterisk will try and ring out, but it just rings and rings and rings and... Nothing from the other side, and dialing in to Asterisk gets me an engaged tone. Dahdi tool shows no alarms, everything ready to go, and I'm sick of trying different combinations of pri-cpe, pri_net, qsig, euroisdn, etc in the chan_dahdi and dahdi_channel configs. Time to go raise a case with Siemens to get them to check their end out.



Axeman3d
Posts: 29
Member Since:
2009-07-17
Sing hosannahs, the link is

Sing hosannahs, the link is UP!

I took the law into my own hands and we pulled the Siemens interface card on the PBX out and back in. It reset the link, and after a few rounds of trying different settings and performing resets we finally got our first Asterisk based phone call through. Looks like if you get the settings too far off, the Siemens cards just lock up and need whacked to bring them back up. For future reference, when connecting to a Siemens HiCom the main settings for an E1 link should be as follows...

chan_dahdi and dahdi_channels
switchtype=euroisdn
signalling=pri_net
context=from-internal

etc/dahdi/system.conf
span=1,1,0,ccs,hdb3,crc4
bchan=1-5,17-31
dchan=16

Thanks for the input guys, it did prove invaluable. I'm off to configure the rest of my phones and try out some of the other functions on Asterisk/Trixbox. Thanks again.



bhenrikes
Posts: 26
Member Since:
2009-03-11
Hi, How do we do the last

Hi,

How do we do the last part?

"Set FreePBX for DAHDI compat mode (might as well update to FreePBX 2.6 at the same time) "

I as trying to install dahdi in 2.6.2.1.

I managed to install dahdi successfully but asterisk wouldn't load dahdi commands..

So my next steps should be to download/configure/install asterisk sources and set freepbx for dahdi compat mode roght?

I know to to deal with asterisk installation but not how to do the last part.

Thanks in advance.
Bruno Henriques



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.