Some plain text.
#!/bin/bash tee /tmp/foo<<'EOF' bar EOF
More plain text.
Some plain text.
#!/bin/bash tee /tmp/foo<<'EOF' bar EOF
More plain text.
Option 43 is a strangely formatted thing, very dependent on the vendor as to what they are expecting. To enable Ruckus APs to find a SmartZone controller, Ruckus’ documentation provides examples of how to set up a Linux DHCP server, but nothing more. Finding out how to do it on a pfSense took some guesswork.
Continue reading “Using DHCP option 43 with pfSense and Ruckus”
I generally run my Asterisk boxes in a very limited virtual environment, so keeping memory usage to a minimum is definitely a good thing. I’ve seen some success in that department by scrapping Apache in place of nginx.
Continue reading “Running FreePBX with nginx”
My environment is running BIND in a chroot jail, using the
bind-chroot package installed with YUM. This article at DigitalOcean got me started; this documents steps specific to a Scientific Linux (or Centos, RHEL, etc) install.
#change into the zone file directory cd /var/named/chroot/var/named/ #generate a zone signing key dnssec-keygen -a NSEC3RSASHA1 -b 2048 -n ZONE example.com #generate a key signing key dnssec-keygen -f KSK -a NSEC3RSASHA1 -b 4096 -n ZONE example.com #append an include to the zone file for both public key files for key in Kexample*.key; do echo "\$INCLUDE $key" >> db.example.com; done #sign the zone (this needs to be done after each update, and every couple of weeks as well) dnssec-signzone -A -3 $(head -c 1000 /dev/random | sha1sum | cut -b 1-16) -N INCREMENT -o example.com -f db.example.com.signed db.example.com #make sure bind is looking at the signed zone files sed -i 's/db.example.com;/db.example.com.signed;/' /var/named/chroot/etc/named.conf #reload bind rndc reload #these are the DS records that the domain registrar needs cat dsset-example.com.
Enable super detailed logging in OpenLDAP. Continue reading “Debugging OpenLDAP ACLs”
There seems to be a lot of misinformation floating around on this subject, but after ignoring most of it and playing around I have a FreePBX system with BLF, remote caller ID, and directed pickup all working fine on my Polycom phone. Here’s how I did it, for the record.
Continue reading “Polycom BLF on Asterisk (and FreePBX)”
I recently had to set up Mac Mail for our company’s Google Apps account (although the same thing likely happens with GMail.) I was seeing strange behaviour which I eventually figured out was due to the weirdness of IMAP and how Google treats labels as folders.
I pretty quickly figured out that it was just a problem of Mail not knowing what folders on the IMAP server were to be used for a specific function. But it took me a few days to figure out how to give Mail that information.
In Mail, open the [GMail] folder and select the Trash (Bin, Deleted items, etc) mailbox. Once it’s open, go to the Mailbox menu, select Use This Mailbox For, and choose Trash. Repeat this process for [GMail]/Sent Items, [GMail]/Spam, and [GMail]/Drafts. Now you can use the webmail interface to delete the Deleted Items, Sent Messages, and [Imap]/Drafts labels.
A similar problem happens with iPhone when using Exchange ActiveSync instead of IMAP. When you use IMAP, you have an option in your account settings to use Archive or Delete. But with ActiveSync, all deleted messages are archived by default, and stay in the All Mail folder. You can change this behaviour by visiting http://m.google.com/sync where you can change a few settings for each mobile device using ActiveSync, including Delete Email As Trash.
I found a lovely script for sending voicemail notifications in MP3 format instead of wav. It’s a bit of a hack, since Asterisk only provides you with an entire, MIME encoded email message as input. Anyway, I improved it somewhat and wanted to share. This version adds call info and an image to the MP3 file, and is more elegant IMHO – e.g. use of
Continue reading “Asterisk voicemail notifications with MP3”
Here is the difficult way to send Asterisk 1.8 voicemail notifications to more than one address. The easy way is to define a sendmail alias on your system. However, if you want to allow management of emails through a GUI like FreePBX, that won’t do much good for you.
From one server to another, no need for file transfers or anything like that. Do this on the new server.
mkdir /foo/bar/new svnadmin create /foo/bar/new ssh firstname.lastname@example.org "svnadmin dump /foo/bar/old" | svnadmin load /foo/bar/new
On your working copies you’ll need to say where the new repository location is:
svn switch --relocate https://old.host/svn https://new.host/svn /path/to/working/copy
Here’s the complicated way to get Asterisk sending voicemail notifications to multiple email addresses. (The easy way? Use group mailboxes and/or sendmail aliases.) Once this modified module is compiled and installed, multiple addresses in
voicemail.conf can be separated by a pipe character.
A couple of changes needed at the time of writing from the usual build requirements.
When you install the MySQL package on Ubuntu Linux, it does not come with a blank password, as most packages and installations do. The package is set up so you can change the password like so:
sudo dpkg-reconfigure mysql-server-5.1
The top Google hits recommend stopping the service, restarting MySQL with privileges disabled, etc. This is not the way it was meant to be done, according to Ubuntu.
So let me guess. You’re using A2Billing on FreePBX – I don’t know how TrixBox or AsteriskNOW work, but the concept is the same – and whenever you forward a phone to an outside number it doesn’t work. Callers get prompted with “Please enter the complete PIN number” instead of having the call completed.
Continue reading “A2Billing authentication of forwarded calls”
Have you ever clicked on your FreePBX link, get prompted for a password, and then sit staring at your browser “connecting to…” your server forever? Restarting Apache doesn’t work, restarting MySQL doesn’t work, even restarting Asterisk doesn’t work. Meanwhile everything else is running just fine, but you need to restart the entire server before FreePBX starts working again.
Continue reading “FreePBX hangs at login”
The valley of the Fraser River is the bed of an ancient arm of the sea which extended as far inland as Hope. It is to a large extent made up of alluvial deposits, according to Dr. Dawson. The Indians have a very ancient tradition which bears out in a legendary way this more scientific premise. They say that the receding of the sea from this district explains the presence of certain varieties of fish. From Lillooet Lake to the Fraser and from Lillooet River to the Stave River is the district of Maple Ridge, which as the name implies, is a shelf or table-land, declining at the two ends, that occurs in the rise of the land from the Fraser River towards the mountains in the far background. It is the neighboring [sic] Municipality to that of Coquitlam and shares most of the natural features of the latter, but having the advantage of lying considerably higher above the level of the river. Briefly, this is how this part came to be settled:
Continue reading “Early History of Municipality of Maple Ridge with Port Hammond and Haney”
pfSense has a captive portal option that allows RADIUS authentication. However, it doesn’t include the option to set the NAS ID of your firewall, instead creating something automatically based on the hostname. Apply these changes (against 1.2.3-RELEASE) to enable a custom NAS ID.
Continue reading “Setting NAS ID on pfSense”
I needed to upload the device manager HTML files to a Cisco switch separately because I was low on flash space. You can’t download the HTML separately from Cisco (at least not for the 2950 switch I was upgrading) so I had to make the TAR myself.
So I made up a TAR file with the usual
tar -cf command and tried to load it, but got a checksum error:
Loading html.tar PaxHeader/html (unknown file type) -- ignored! %Tar checksum error in ftp://22.214.171.124/html.tar
Turns out that Cisco requires and old format TAR file (compatible with V7 UNIX.) Create the archive with
tar -cof and it will work out.