Communications

configuring htaccess restrictions on debian apache2 server

Communications | Debian Support | Support

This is a quick guide on how to set up htaccess restrictions on a directory located on a server running apache2 with a debian OS.

First, you will need to update the httpd.conf file, which should be located in the apache2 directory, as follows:

&#60Directory (directory to be protected)&#62
Options Indexes Includes FollowSymLinks Multivews
AllowOverride AuthConfig
Order allow,deny
Allow from all
&#60/Directory&#62

Make sure to take out the "" they are only included so this post displays properly.

Once this update is saved, restart the apache2 server with the following command, or something like it depending on your setup, as follows:

byo71's picture

search and replace in mysql

Communications | Database Software

can also be used in phpmyadmin

UPDATE tablename SET tablefield = replace(tablefield, "findstring", "replacestring");

very handy for changing all entries in one field to another value

byo71's picture

converting mp3's for use as polycom ringers

Asterisk Programming | Communications

first use mhWaveEdit and convert to 8 bit 8000hz mono

then

sox phonesring.wav -U -c1 phonesring1.wav

to put in g711

# file phonesring.wav
phonesring.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 8 bit, mono 8000 Hz

how to use awk to add information to a text file

Communications | Debian Support


awk '{if(/texttofind/) {printf("%s\nfromuser=%s\n",$0,substr($3,index($3,"<")+1,index($3,">")-2))} else print $0}' "file1.txt" > "file2.txt"

where:
if(/texttofind/) does A) if it is true or does B) if not true

texttofind is the text you want to add a new line after

printf("%s\nfromuser=%s\n",$0,substr($3,index($3,"<")+1,index($3,">")-2)

this statement prints the origional line in string format, then drops a new line with the /n. Then prints: fromuser=.. then prints a substring from the above line where the start of the substring is a "<" and the end of the substring is a ">"

byo71's picture

fsck your root partition

Communications | Debian Support

telinit 1
mount -o remount,ro /
fsck -f /dev/hd..
mount -o remount,rw /
runlevel
telinit 3

byo71's picture

mount iso cd image

Communications | Debian Support

mount -o loop -t iso9660 /root/Desktop/etch-custom-1013.iso /mnt/iso

move all mp3 files from 1 partition to a single folder using 1 command.

Communications | Debian Support

To make a list of all the files in a certain place...

locate *.mp3 | grep video > file.txt

To do a mass move of all the files

mv $(cat file.txt | perl -pi -e 's/ /\ /g' | cut -d "/" -f 5 | cut -d "/" -f 2 | sort | uniq) /mnt/home/music/

of course this is just and example, you will have to modify the cut commands and locate commands to do exactly what you want.

do not just copy and paste this command into your console it will not work.

How to be sure your sangome a200 hardware echo cancellation is working

Asterisk Installation Guides | Communications

Is my hardware echo canceller running?

How to confirm that your hardware echo canceller is running and active on your Zap calls.

1. Confirm that you have a hardware echo canceller:
After the Wanpipe drivers are installed, type:
#>wanrouter hwprobe
It should say:

1. AFT-AXX-SH : SLOT=X : BUS=X : IRQ=X CPU=A: PORT=X : HWEC= 32 : V=X
HWEC values should be:
A200d : 32
A101d : 32
A102d : 64
A104d : 128
A108d : 256
If it says HWEC=0, and you ordered a "d" model card,
If you purchased this card from a reseller, contact your reseller.

A Simple but effective QOS script for all IAX traffic going to a certain host.

Asterisk Installation Guides | Communications

I have been trying to get this working off and on for a year now. Part of the reason was my lack of linux administrator experience and QoS is a rather advanced topic. After spending many hours researching and trying scripts that are too complicated and dont seem to work and hours of waised time dealing with customers who like to bomb out their internet connection with outlook and the like, i have created this script which i have borrowed ideas from many different places on the web as well as spending a few hours reading about the iproute and tc application tool set. I have tested this script and it will make a huge difference on crappy DSL connections although it doesn't fix it perfectly. On T1 connections, it does make a huge difference. This script is meant for use with IAX server to server communication or with limited effects, a sip phone with the QoS bit set to 0x10 (minimize latency) I hope it helps you out so we can make VOIP the dominant technology in the world.

byo71's picture

OpenVPN GUI installer fails to install the TAP32 adapter

Communications | Debian Support

Ever try to install the OpenVPN GUI from openvpn.se and have the tapinstall.exe fail?

Windows 2000/XP has a bug that it cannot properly detect new hardware by
*.inf files, if the RunOnce registry key is missing for the following
location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

This key is often used by installers to execute post-reboot programs, but
sometimes they accidentally delete this key.

IMPORTANT: This article contains information about modifying the registry.
Make sure that you understand how to backup and restore the registry, in
case a problem occurs. Please read the linked Microsoft Knowledge Base

XML feed