Change timezone on Ubuntu server (CLI only)
Using the command line, you can use dpkg-reconfigure tzdata.
Follow the instructions to reconfigure the timezone. This was taken from the ubuntu wiki article
Cheers, Mark
Using the command line, you can use dpkg-reconfigure tzdata.
Follow the instructions to reconfigure the timezone. This was taken from the ubuntu wiki article
Cheers, Mark
For this example I'm going to replace the standard digits of 0 to 10 with files that I've had recorded.
We can convert them to alaw, ulaw and gsm formats which reduces asterisk transcoding with the following script: (requires sox to be installed)
I'm going to use the name 'learnosity' for the language as these are the files that we've recorded. So we need to create the following directory on the asterisk machine:
If you wanted to do more audio files, you can create learnosity directories for the other audio files.
Once this is done, copy the alaw, ulaw and gsm files in but leave the original wav files out.
The easiest way to use these language files is to set the channel language for the sections you want to use it:
Here's an example from extensions.conf:
If you dial extension 4 you get the digits 1 to 9 in the default language and if you've done everything correctly you will get your newly recorded digits the second time.
Cheers, Mark
I needed to use a case function on a subquery value to return a tri-state value. I.e. yes, no or partial.
The cut down query below demonstrates how it works.
Mostly posted for my future reference but hope it helps out.
Cheers, Mark
I was returning a query with some bit fields into my class but the it was not returning true or false when I switched the data.
A bit of hunting and it turned out the that it was being returned as a binary type and after a few failed attempts to convert it to an integer or boolean on the PHP side I found this bug report on it.
So the moral of the story is if you are selecting BIT types from a mysql DB in PHP don't do this:
Instead cast the bit to an integer in MySQL like so:
Voila, it works like expected.
Cheers, Mark Lynch
There was lots of free space on the drives as the root partition was only using a small portion of the disk. After running fdisk to partition it and mkfs.ext3 on the partitions to format them I couldn't see them in /dev/disk/by-uuid.
A quick google presented the solution:
According to the man page this makes udev request the kernel device uevents, which in essence makes it read the disk info again and show it all up so you can mount it happily.
Cheers, Mark