Most Popular: Tech

Asterisk – How to Host a PRI Circuit with a Sangoma Card

These are just a few quick notes of mine on how to host a PRI circuit from a Sangoma card in an Asterisk server to another Asterisk server or wherever for that matter.

This config here is for a Sangoma A102 with two ports and Asterisk will provide the clocking source. Channels 1-23 will be the B channels and channel 24 will be the D channel for signaling. Echo cancelling will be enabled as well.
/etc/dahdi/system.conf

#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
#autogenrated on 2015-08-28
#Dahdi Channels Configurations
#For detailed Dahdi options, view /etc/dahdi/system.conf.bak
loadzone=us
defaultzone=us

#Sangoma A102 port 1 [slot:4 bus:6 span:1] 
span=1,0,0,esf,b8zs
bchan=1-23
echocanceller=mg2,1-23
hardhdlc=24

#Sangoma A102 port 2 [slot:4 bus:6 span:2] 
span=2,2,0,esf,b8zs
bchan=25-47
echocanceller=mg2,25-47
hardhdlc=48

Continue reading “Asterisk – How to Host a PRI Circuit with a Sangoma Card”

PHP – Simple PDO Class for Connecting to a MySQL Database

Here’s an extremely basic, reusable PHP and MySQL based PDO class for easily connecting to multiple database servers simultaneously within a script without having to go through a bunch of hoopla. Tidbits have been pieced together from the following sources with a little tweaking of my own (such as the ability to have default database values or to pass them as arguments):
http://simple_pdo_implementation.onlinephpfunctions.com/
http://culttt.com/2012/10/01/roll-your-own-pdo-php-class/
http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access–net-12059
Continue reading “PHP – Simple PDO Class for Connecting to a MySQL Database”

Windows Update Error 80073712 When Installing KB2943357 – OR – How to Repair Corrupted Windows Update Files on Windows 7 or Server 2008

Starting with Windows 8 and Server 2012, you can more easily fix corrupted updates using the “DISM.exe /Online /Cleanup-image /Restorehealth” command, but what about on Windows 7 or on Server 2008? Well, to be honest, it is kind of a pain in the ass and quite a lengthy process.

This seems to be a prime candidate for some sort of automated batch or PowerShell script that could parse out the bad updates from the log file, extract the needed files from the KB .msu packages, move them to the temp directory, and then re-run the System Update Readiness Tool. Lord knows it would save a lot of people some time and headaches but I don’t know whether it is even worth the hassle of programming it all seeing as how mainstream support for Windows 7 will be up soon and extended support will be around until 2020. That and I’m sure a lot of people have been suckered into upgrading to Windows 10 for free as well. It’s ok, there’s nothing in that giant wooden trojan horse that they just carted into your living room. Your data is safe and there are absolutely zero privacy concerns, trust them. Go back to sleep zombie.

Anyways, if you have installed any Server 2008  or Windows 7 operating systems in the last say year or so, you probably have noticed that Windows Update gets broken almost every single freaking time and it is quite cumbersome. So here is the cliff notes version on how to repair your corrupted Windows Update files.
Continue reading “Windows Update Error 80073712 When Installing KB2943357 – OR – How to Repair Corrupted Windows Update Files on Windows 7 or Server 2008”

Remote Desktop Server – Registry Key to Change RDP Listening Port

As you probably already know, by default, Microsoft Remote Desktop listens on port 3389. This is all good, but what if you are behind a firewall and wanted to allow port forwarding to be able to access multiple computers via RDP remotely but can’t because they are all running on the same port?

Well, if you’re crafty and have a decent Linux-based router like Mikrotik that will let you create packet mangling rules to change the destination port number, you can get around this, but in environments where you have little SOHO routers like Linksys or Belkin, typically this is where changing the port number that RDP listens on comes in handy. The only problem then is remembering whatever port you changed it to because then you have to specify it anytime you connect via RDP which can be a pain if you’ve got a bad memory. There are already a thousand and one articles out there to help you change the port number, this is a quick post for future reference for myself.
Continue reading “Remote Desktop Server – Registry Key to Change RDP Listening Port”

Mac OS X El Capitan – Cannot Restart into Boot Camp Partition

Ever since the 10.11 update, I couldn’t force a restart into my Windows Boot Camp partition on my Mac from the terminal, I would get an error message “Could Not Set Boot Device Property: 0xe00002bc”.

After a bunch of riggamaroll and dicking around with the USB keyboard not being detected for freaking ever, I was finally able to get booted into recovery mode. In the past, I have been able to hold the “Alt” key to select a boot device from the boot menu, but for some reason it wasn’t working any more on my Windows keyboard. I never could get the USB keyboard to show up until I was fully booted up into the OS, so eventually I swapped it out for a name brand keyboard and then it worked.
Continue reading “Mac OS X El Capitan – Cannot Restart into Boot Camp Partition”

Playstation 4 – Cannot Connect to the PSN Using Comcast Gateway

Back around Thanksgiving of this year, some family of mine was having some difficulty connecting to the Playstation Nework on his shiny new PS4 on his Comcast internet. Being the helpful tech stooge that I am, I decided to come over to offer my hand in assistance. I had previously set up all of the port forwarding rules and everything on his modem before for his PS3 and it was all working until now, so the issue didn’t make a lot of sense to me.

All in all, I ended up spending several hours scouring the PSN forums to figure out how to fix this issue and so I figured I would save you some time by documenting the resolution. It didn’t matter if I set the PS4 up with a static IP address, static DNS, or by putting it into a DMZ, nothing I did could make it connect to the Playstation Network. The strange part was, although all of the network test results were saying they were ok and he had a type 2 NAT type, I still couldn’t connect. What gives? I was baffled by this issue.
Continue reading “Playstation 4 – Cannot Connect to the PSN Using Comcast Gateway”

OpenMCU-ru – DSCP Based QoS Packet Tagging Rules for Linux IP Tables

In Ubuntu, the best way to ensure that the firewall is up and running and that your packet filtering or mangling rules are in place any time the network connection comes up, you should create a rule in the /etc/network/if-up.d folder. An alternative approach to that would be to put a “post-up” rule on whatever interface in you /etc/network/interfaces file. From my experience, so that your firewall rules can be easily maintained as well having the ability to make comments for each rule, it’s ideal to take advantage of the iptables-save and iptables-restore functionality.

In order to follow this procedure, the first time you set up the firewall, you will have to manually add all the firewall rules and then issue the iptables-save command. For sake of saving time, I will just provide you with the contents of my config file that can be restored with the iptables-restore < config_file command. Continue reading “OpenMCU-ru – DSCP Based QoS Packet Tagging Rules for Linux IP Tables”

Outlook 2010 – Only Starts in Safe Mode

What a surprise, this morning I came into the office only to find that all of my people running Outlook 2010 were now having it open in Safe Mode and I immediately thought, OK this had to have been a Windows Update issue. This seems to be the norm for old Microsuck these days, as I’ve had these sort of problems with Outlook happen twice within the last month. Perhaps they should come up with a new slogan, “Microsoft: Raising the Bar in Repudiation”. Continue reading “Outlook 2010 – Only Starts in Safe Mode”

Mac OS X – Force Spotlight Search to Index a Network Folder

I’ve had some ongoing issues with some Mac users at work recently who were complaining about the length of time that it was taking for Finder to open up some of our network shares. At first, I thought that the issue may have stemmed from our backups that happened to be running at the same time, but after I figured out how to make those processes run in the background and only when the system was idle and that the problem was still prevalent, I had to investigate further.

Upon further inspection, I found that the folders in the network drives they were accessing and sometimes taking up to a minute or more to populate, in most cases had several thousand files and subfolders. After the initial loading of the folder, everything was still easily accessible and readily available after that if you left that directory and came back into it, so chalk it up to a folder caching/indexing issue. Continue reading “Mac OS X – Force Spotlight Search to Index a Network Folder”

BackupExec 2012 – How to Limit CPU Usage and Disk I/O on RALUS with Cron Jobs

Backup Exec on Linux, otherwise known as RALUS, is great but it has no provisions for limiting it’s disk I/O or CPU usage during different periods of the day. Unfortunately, BE for Windows doesn’t have that option either, so get on it Symantec, nudge, nudge.

If you’re like me, you might have backup jobs on File Servers that span several terabytes worth of data that can essentially run for a day or two on their own. The problem is that people get really bitchy when things don’t run at the normal speed that they are used to and the inconsiderate assholes don’t give a shit when you explain why.

Well here are a few cron job tasks that I came up with to help relieve some of that pressure on your file server. Continue reading “BackupExec 2012 – How to Limit CPU Usage and Disk I/O on RALUS with Cron Jobs”