After the last post where I thought asterisk was pretty much set up, I was really disappointed to find I couldn't for the life of me get the web gui to work properly. By this time however, I knew all about how to get the zaptel driver configured and running properly, so we went back to the machine we set up following the guide here. After restoring the backup I found that the driver didn't work properly, but that was fixed by just compiling and installing it again. Then going into the asterisk command line, we still didn't have the 'zap' commands. After searching around I finally found that it was due to the asterisk people renaming everything to do with zaptel to DAHDI (Digium Asterisk Hardware Device Interface). So now that we got that working its just a question of getting the correct configurations and the correct rules set up. So, hopefully another day or two should sort it.
Tech tips, mostly to do with Linux, Ubuntu, Grails, PHP, development tools and so on...
Thursday, 13 November 2008
Tuesday, 11 November 2008
Asterisk on a debian box
The job I'm currently doing at the moment is trying to set up a VoIP/PBX box which sits on the network and basically routes all local calls through the PSTN and routes all international calls through a VoIP provider (kind of like Skype). So the idea is that you save money on international calls by not having to use the telco's network.
So the idea was pretty good, and it seemed that the Asterisk software was pretty mature, but I did run into some problems. The first time I tried setting this up I tried downloading, compiling and installing the zaptel driver and the asterisk software manually. This led to some kind of error where no matter what happened Asterisk could not see the telephone cards. Although, for some reason the web interface working on top of Asterisk could.
But anyway, the way I finally got it working was to download and install the zaptel source code for the drivers from the debian repositories and then compile the driver. Apparently you can't get pre-compiled drivers from the debian repo's. The package itself (zaptel-source) had a dependency on another package called 'module-assistant'. After installing the zaptel-source package through apt, I compiled and installed the package using the command 'm-a a-i zaptel' i.e. 'module-assistant auto-install zaptel'. This managed to install the drivers properly. Then, I installed the asterisk version in the debian repository as well by just running 'apt-get install asterisk'.
Tomorrow, I start configuring the asterisk installation.
So the idea was pretty good, and it seemed that the Asterisk software was pretty mature, but I did run into some problems. The first time I tried setting this up I tried downloading, compiling and installing the zaptel driver and the asterisk software manually. This led to some kind of error where no matter what happened Asterisk could not see the telephone cards. Although, for some reason the web interface working on top of Asterisk could.
But anyway, the way I finally got it working was to download and install the zaptel source code for the drivers from the debian repositories and then compile the driver. Apparently you can't get pre-compiled drivers from the debian repo's. The package itself (zaptel-source) had a dependency on another package called 'module-assistant'. After installing the zaptel-source package through apt, I compiled and installed the package using the command 'm-a a-i zaptel' i.e. 'module-assistant auto-install zaptel'. This managed to install the drivers properly. Then, I installed the asterisk version in the debian repository as well by just running 'apt-get install asterisk'.
Tomorrow, I start configuring the asterisk installation.
Thursday, 4 September 2008
W3Schools HTML and XHTML tutorials
I just finished going through the W3Schools' HTML and XHTML tutorials. HTML is one of those things that I know, but have never really been a master in. I guess that has to do with the fact that the only time I was actually taught html was in high school. At university we did get a few snippets here and there (I remember Ulrich teaching us CSS) but in general we didn't learn it.
Going through the tutorials was interesting if only because it gave you a nice idea what can be done with just pure (x)html. There are a lot of things I thought were quite new and novel, part of the web 2.0 thing, that I now realise were around for a while. I also really like the reference section and the link to the W3C validators. I'm gonna try to validate any websites I write against those validators from now on.
Going through the tutorials was interesting if only because it gave you a nice idea what can be done with just pure (x)html. There are a lot of things I thought were quite new and novel, part of the web 2.0 thing, that I now realise were around for a while. I also really like the reference section and the link to the W3C validators. I'm gonna try to validate any websites I write against those validators from now on.
Wednesday, 3 September 2008
Useful (X)HTML Tags
There are some HTML and XHTML tags which are really useful that I hadn't heard of until recently having a look at the W3Schools tutorial on HTML
The <pre> tag defines preformatted text (i.e. text which preserves spaces, new lines etc..) This can be useful if you have some text whose properties you want to keep
Then we have a whole bunch of tags dedicated to displaying computer code and related artifacts. Tags like code (for computer code), kbd (for keyboard input), tt (for teletype text), samp (for sample text) and var (for computer variables. As far as I can tell, all of these, with the exception of the var tag, simply output the text in a monospace font while preserving the formatting (new lines and spaces). The var tag outputs slightly larger text which is bold and italic.
The address tag
The <address> tag is used to display addresses, such as the following
Donald Duck
BOX 555
Disneyland
USA
Actually I don't know why I put this one in the 'useful' category, I haven't really seen it used much at all and it doesn't seem too useful to me anyway, but you never know when it could come in useful
The abbreviations and acronyms tags
I really liked these tags and in fact it's a shame they don't get used more often. Especially in the Computer Science/IT fields. I can't remember the amount of times I've been reading an article, tutorial, job description and had to google a acronym or abbreviation in order to figure out what's being talked about.
e.g. <abbr>
UN
e.g. <acronym>
WWW
As you can see, they're kind of like the 'alt' tag of an image or a link.
The bdo (bi-directional override) tag
This has to be the coolest, least used feature of html. Essentially this tag allows you to display text backwards. By putting some text between <bdo dir="rtl"> and the closing bdo tag, the text is reversed.
This text should display backwards.1234567890
The <pre> tag defines preformatted text (i.e. text which preserves spaces, new lines etc..) This can be useful if you have some text whose properties you want to keep
for int i = 0 to 10The computer tags
print i
next i
Then we have a whole bunch of tags dedicated to displaying computer code and related artifacts. Tags like code (for computer code), kbd (for keyboard input), tt (for teletype text), samp (for sample text) and var (for computer variables. As far as I can tell, all of these, with the exception of the var tag, simply output the text in a monospace font while preserving the formatting (new lines and spaces). The var tag outputs slightly larger text which is bold and italic.
The address tag
The <address> tag is used to display addresses, such as the following
Donald Duck
BOX 555
Disneyland
USA
Actually I don't know why I put this one in the 'useful' category, I haven't really seen it used much at all and it doesn't seem too useful to me anyway, but you never know when it could come in useful
The abbreviations and acronyms tags
I really liked these tags and in fact it's a shame they don't get used more often. Especially in the Computer Science/IT fields. I can't remember the amount of times I've been reading an article, tutorial, job description and had to google a acronym or abbreviation in order to figure out what's being talked about.
e.g. <abbr>
UN
e.g. <acronym>
WWW
As you can see, they're kind of like the 'alt' tag of an image or a link.
The bdo (bi-directional override) tag
This has to be the coolest, least used feature of html. Essentially this tag allows you to display text backwards. By putting some text between <bdo dir="rtl"> and the closing bdo tag, the text is reversed.
This text should display backwards.1234567890
Saturday, 16 August 2008
Multi Boot Linux and OpenSolaris
In this post I'll describe how I set up my laptop to be a multi boot environment with OpenSolaris, Ubuntu, Fedora and OpenSUSE.
UPDATE: This guide was created when almost all Linux distro's were using GRUB as their boot loader. Recently there has been a big move to GRUB2 and the following article needs to be updated.
First of all we need to know some things
1. You can only have up to 4 primary partitions on a hard drive
2. A linux swap partition has the same identifying code as a Solaris partition. This means that linux systems will see the partition as a swap partition. It also means that in order to install OpenSolaris any linux swap partitions should come after the Solaris partition.
3. Due to using ZFS, OpenSolaris uses a modified version of GRUB.
Preparing Partitions:
The way I set up my partitions is as follows

The first partition is very small and will be used at boot time to show a menu selecting which OS to boot. The second partition is the OpenSolaris partition, its being recognised as a swap partition by gparted. Then we have one large extended partition, which holds a partition for swap and then seperate partitions for each flavour of linux. The 20Gb partition at the end of the extended partition holds data which needs to be accessible by all OS's and I have left some free space on the extended partition, in case the data partition needs to grow or I feel like adding another OS.
After setting up the disk like this, go ahead and install OpenSolaris on the second partition. Solaris will write to the MBR (Master Boot Record) of the drive and point it to the grub install on its partition. Next install Ubuntu and make sure that when it comes to the partitioner stage of the install choose to do a manual setup. Choose to use the smaller swap partition on the extended partition as the swap, do not use the OpenSolaris partition as swap. Also use the first ext3 partition on the extended partition as the root partition i.e. '/'. Also you must specify to the Ubuntu install to install grub to the root partition, not to alter the MBR. At this point when you reboot your computer you will still only get the OpenSolaris grub menu, because we haven't altered the MBR.
Next we have to pop in a linux live cd, copy over the /boot/grub directory from the Ubuntu partition onto the first partition on the disk, modify the menu.lst file and then set up the MBR to point to it. This is called setting up a dedicated grub partition and is described better here. For the Linux partitions I used the 'configfile' directive in grub's menu.lst, however because grub can't see the OpenSolaris partition, for the OpenSolaris entry you have to use the 'chainloader' directive i.e.
title OpenSolaris 2008.05
rootnoverify (hd0,3)
chainloader +
Installing Fedora and OpenSUSE, we follow the install, making sure that we install them to the correct partitions, and specify that they shouldn't use the OpenSolaris partition as swap, but instead use the other one and that they don't install grub to the disk MBR, but only install it to the local partition. Then we have to modify the menu.lst file on the dedicated grub partition to point to the new OS's we've just installed.
And that's it. We now have a multi boot computer consisting of OpenSolaris and three different flavours of linux.
Monday, 28 July 2008
Update - 4 months later
So I was looking at the post I made about 4 moths ago here, talking about my plan to become a decent web developer. Here's the situation at the moment:
Step 1: Wiring up my house. Still not done, however becoming more possible now that my boss offered me the use of the company account to order components (ethernet cables & accessories) for practically wholesale prices.
Step 2: Domain name. Got one, from dyndns.org. Website can be found at srdan.ath.cx
Step 3: Learning about webservers, file servers, ssh servers, nfs servers, ftp servers, proxies etc... Going quite well. Work is helping in this respect, have had to rebuild a webserver recently as well as set up dhcp, dns, samba servers.
Step 4: Install software for the management of my server. Going quite well also. Getting some good experience from work. Just learned about a nifty tool called Mandriva Directory Server as well as tools like Webmin and ISPConfig.
Step 5: Installing existing CMSs' and understanding how they work. Not as much done on this front. Haven't really coded in php in a while or had a look at any source code for a while.
Step 6: Learn Cascading Style Sheets. Not much done on this front either, should really put more effort in.
Step 7: Learn Javascript. Nope
Step 8: Learn XHTML. Nothing
Step 9: Learn AJAX. Nada
So, overall could be better, but could be worse as well. I'm learning the most at my work and that's a good thing, to be paid as you're learning. Hopefully the second two thirds of the year will see me take on more web based technologies. I'm also looking to get a .NET server running under linux, it should be possible using Mondo. The best part obviously being that it's free :)
Step 1: Wiring up my house. Still not done, however becoming more possible now that my boss offered me the use of the company account to order components (ethernet cables & accessories) for practically wholesale prices.
Step 2: Domain name. Got one, from dyndns.org. Website can be found at srdan.ath.cx
Step 3: Learning about webservers, file servers, ssh servers, nfs servers, ftp servers, proxies etc... Going quite well. Work is helping in this respect, have had to rebuild a webserver recently as well as set up dhcp, dns, samba servers.
Step 4: Install software for the management of my server. Going quite well also. Getting some good experience from work. Just learned about a nifty tool called Mandriva Directory Server as well as tools like Webmin and ISPConfig.
Step 5: Installing existing CMSs' and understanding how they work. Not as much done on this front. Haven't really coded in php in a while or had a look at any source code for a while.
Step 6: Learn Cascading Style Sheets. Not much done on this front either, should really put more effort in.
Step 7: Learn Javascript. Nope
Step 8: Learn XHTML. Nothing
Step 9: Learn AJAX. Nada
So, overall could be better, but could be worse as well. I'm learning the most at my work and that's a good thing, to be paid as you're learning. Hopefully the second two thirds of the year will see me take on more web based technologies. I'm also looking to get a .NET server running under linux, it should be possible using Mondo. The best part obviously being that it's free :)
Sunday, 27 July 2008
Random Links
http://antitrust.slated.org/www.iowaconsumercase.org/011607/3000/PX03020.pdf
http://www.osnews.com/story/17689/Bill-Gates-on-Making-ACPI-Not-Work-with-Linux/
http://howflow.com/tricks/medion_md_98300_fan_control
http://blogs.zdnet.com/perlow/?p=9190
http://www.osnews.com/story/17689/Bill-Gates-on-Making-ACPI-Not-Work-with-Linux/
http://howflow.com/tricks/medion_md_98300_fan_control
http://blogs.zdnet.com/perlow/?p=9190
Subscribe to:
Posts (Atom)