Ubuntu-9.10- Karmic Koala

Alright, I’m going to prepare a complete document on what I did and I’ll post here.

Give me sometime (not too long though ) :smile: , okay.

ahh fantastico! cheers matey

im guessing im doing somethign wrong then?

Hey,
So here’s my doc:

Asterisk Install:

In terminal:
sudo apt-get install linux-headers-$(uname -r) build-essential
automake autoconf bison flex libtool libncurses5-dev libssl-dev
subversion svn-buildpackage

This will install headers needed. Still Dahdi would need Linux Kernel 2.6.31-16-server (Which you can install it through Synpatic package manager)

In terminal:

Make a dir called asterisk in /usr/src/
cd /usr/src
cd mkdir asterisk.

Download the asterisk from (asterisk.org/downloads)

Download these tar files (asterisk-1.6.1.9 source tarball, DAHDI Complete 2.2.0.2+2.2.0 source tarball and Libpri-1.4.10.2 source tarball ) and save it in /usr/src/asterisk

Unzip all the three tar files into asterisk folder created in /usr/src
sudo tar –xvf asterisk-1.6.1.9.tar.gz
sudo tar –xvf libpri-1.4.10.2.tar.gz
sudo tar –xvf DAHDI Complete-2.2.0.2+2.2.0.tar.gz

Next install libpri-1.4.10.2:
cd /usr/src/asterisk/Libpri-1.4.10.2
sudo make clean
sudo make
sudo make install

Install DAHDI:
cd /usr/src/asterisk/DAHDI Complete
sudo make clean
sudo make
sudo make install
sudo make config.

Finally, install asterisk:
cd /usr/src/asterisk/asterisk
sudo make clean
sudo ./configure
sudo make install
sudo make samples
sudo make config

Once you done with all the above without any error, try to issue the below command:
sudo asterisk –r ( To connect to asterisk remotely for the dialplan to work )

If you get a message, Unable to connect to asterisk, does /var/run/asterisk.ctl exist?
Don’t panic, I can help you with that too.

But this is what I did for my install.
P.S: I have asterisk-1.6.0 version.

cheers mate for the help me file!

an issue…i cant seem to be able to find the kernel 2.6.31-16

even doing a search within synaptic doesn’t find it?

this looks like a similar issue that im having…if it makes any sense to anyone?

issues.asterisk.org/view.php?id=16080

First thing, did you try to install asterisk?

Leave off the option: Still Dahdi would need Linux Kernel 2.6.31-16-server (Which you can install it through Synpatic package manager)

Just go ahead with others and let’s see what happens?

i didnt carry on after the failure of Dahdi.

i will resume the installation (minus Dahdi)

edit

Asterisk is now installed and running (after i rebooted) (1.6.1.9)

:smile:

but i will need to install something as im using a digium card over our isdn30e’s

Hey,

Are you able to connect remotely?

What does the word ‘something’ denotes? You mean ‘Dahdi’

Take a look at link below:
svnview.digium.com/svn/dahdi/lin … threv=5842
It might help you pal!

fantastico!

sorry what i meant by “something” was i need to get the digium card working as i wont be usin iax etc, i rely on isdn’s

thanks for all your help!

Edit

what do i do with that website? sorry im a wee bit new to this Linux stuff

Is your Dahdi working now?

That website, tells that the DAHDI has been upgraded the part with read markings is old ones to be replaced with green ones.

Since you have the old one, you got those errors, if the re-boot did work for you, then good.

dahdi didnt install though, as i was receivng the errors when it compiled.

i have just installed Asterisk without dahdi.

what do i do with the new file? can i copy the contents of one file to another? or is there an update i can do?

thanks

Actually in my case I installed asterisk in Jaunty and when I upgraded to Karmic, I had my upgrades for all conf files, which I think dadhi should also be included in it.

If I find any solution for your problem, I’ll let you know pal.

ahh right, i think thats why you have the kernel version too, i have just been through synaptic and its definitly not there :frowning:

thanks for your help though

Let’s put our heads together.

Can you issue the command service dahdi start on your terminal?

Post your message here.

I have a solution for your problem.

Surprisingly, when I issued the command for dahdi, it gave a message
FATAL: missing /dev/dahi! (Which means that dahdi is not yet installed)

First thing, open the terminal an do as below:
cd /usr/src/asterisk/dadhi-complete-linux-2.2.0.2+2.2.0
sudo make clean
sudo make

Here you’ll come across an error,
ERROR: You do not appear to have the sources for the 2.6.31-14-generic-kernel-pae kernel installed.

You’ll find the package in synaptic package manager.
Install it.

Now when you re-compile your dahdi, you’ll come across the same error as you earlier ones.

Follow the below steps to solve:
replace the file base.c with the one I attach here

The base.c file location

/usr/src/asterisk/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/wctc4xxp/base.c

You can’t replace a file just like that in linux. So open the terminal
cd /usr/src/asterisk/dahdi-linux-complete-2.2.0.2+2.2.0/linux/drivers/dahdi/wctc4xxp
sudo nano base.c ( default file will appear )

(Actually I did lot of changes here and there, it’ll buy you more time) so replace your base.c file with below)
base.c
NOTE: The change is indicated by bold text

/new patch attachment/
#ifdef HAVE_NET_DEVICE_OPS
static const struct net_device_ops wctc4xxp_netdev_ops = {
.ndo_set_multicast_list = &wctc4xxp_net_set_multi,
.ndo_open = &wctc4xxp_net_up,
.ndo_stop = &wctc4xxp_net_down,
.ndo_start_xmit = &wctc4xxp_net_hard_start_xmit,
.ndo_get_stats = &wctc4xxp_net_get_stats,
.ndo_do_ioctl = &wctc4xxp_net_ioctl,
};
#endif

if you have karmic version and if your dahdi is upgraded add the lines : /new patch attachment/ in front of the line:

/**

  • wctc4xxp_net_register - Register a new network interface.
  • @wc: transcoder card to register the interface for.
  • The network interface is primarily used for debugging in order to watch the
  • traffic between the transcoder and the host.

*/

memcpy(netdev->dev_addr, our_mac, sizeof(our_mac));
# ifdef HAVE_NET_DEVICE_OPS
netdev->netdev_ops = &wctc4xxp_netdev_ops;

# else
netdev->set_multicast_list = &wctc4xxp_net_set_multi;
netdev->open = &wctc4xxp_net_up;
netdev->stop = &wctc4xxp_net_down;
netdev->hard_start_xmit = &wctc4xxp_net_hard_start_xmit;
netdev->get_stats = &wctc4xxp_net_get_stats;
netdev->do_ioctl = &wctc4xxp_net_ioctl;
# endif
netdev->promiscuity = 0;
netdev->flags |= IFF_NOARP;

These are changes that got me back on wheels.
That’s it, now try to install dahdi as mentioned in my earlier. And dahdi will be installed.

Just in case, if it shows you error again, please follow the link to make corrections to your base.c file. I tried to place my entire base.c file but I went off the character limit. Make sure your base.c file is carbon copy of the file in the link, that will get you going.
http://svnview.digium.com/svn/dahdi/linux/branches/2.2/drivers/dahdi/wctc4xxp/base.c?revision=7539&content-type=text%2Fplain

I had installed it successfully. Just to confirm issue below commands:
sudo service dahdi restart
Unloading DAHDI hardware modules: done
Loading DAHDI hardware modules:
WARNING: All config files need .conf: /etc/modprobe.d/dahdi.blacklist, it will be ignored in a future release.
WARNING: All config files need .conf: /etc/modprobe.d/dahdi, it will be ignored in a future release.
dahdi: done dahdi_dummy: done dahdi_transcode: done
Running dahdi_cfg: done.

you my friend… are a star!!

it worked, i now have dahdi running, if i run the command dahdi_hardware it returns WCT4XXP+ TE220 Wildcard

woohoo!!!

thanks!

kudos to you! :mrgreen:

Thanks! :smile:
I’m glad, it’s working for you. Even in future If you upgrade to next Ubuntu version, when it comes to DAHDI ( or maybe renamed to whatever ) read you errors, I think mostly it’ll be the patch file problem like the one you came across now.

BTW, do you know how to set-up diaplan between asterisk and analog phone with ATA adapter?

If yes, let me know.

thanks once again!!

for analog lines, i used a Linksys SPA400, these provide the ability to connect to 4 analogue lines

to use normal analoge phones i use a Linksys SPA8000

these both work great with Asterisk, the SPA400’s were a bit of a pain to get to register with Asterisk, it was an issue with the registeration line in Sip.conf

Hey,

I’m trying to use Linksys SPA 3012 with asterisk. Can you tell me how to write dial plan in asterisk for sip.conf and extensions.conf files. I made the softphone to register and communicate in both ways. But the analog lines it’s bit vague for me :cry:

here you go, i dont know if you will need to change it much for the SPA3012

[code]
"extensions.conf"
exten => Spa_Ireland,1,Answer() ; calls in via Spa_Ireland
exten => Spa_Ireland,2,GoTo(Internal,6,1)

[Ireland_Local]
exten => _XXXXXXX,1,Set(Aire=${EXTEN})
exten => _XXXXXXX,2,Dial(SIP/Spa_Ireland/${Aire},60,r)
exten => _XXXXXXX,3,Goto(Spa_Ireland${DIALSTATUS},1)
exten => Spa_Ireland-BUSY,1,Dial(Zap/g1/${Aire},99999,wWtT)
exten => Spa_Ireland-CONGESTION,1,(Zap/g1/${Aire},99999,wWtT)

"sip.conf"
register= Spa_Ireland@IP-Address/Spa_Ireland

[Spa_Ireland]
type=friend
user=Spa_Ireland
host=the ip address of the device
dtmfmode=rfc2833
canreinvite=yes
context=context device is in
disallow=all
allow=ulaw ; prefered codec for DTMF detection
qualify=yes[/code]