UPDATE – Managing Multiple Interfaces with Fedora 21, libvirt, Qemu, NetworkManager

This post is an update to a previous post on using multiple interfaces(Ethernet cards) on the LAN, – utilizing RedHat’s popular virtualization tools – QEMU, KVM, libvirt, and virt-manager.  In this article I will demonstrate with Fedora 21, but this roughly applies to CentOS 7 as well.

I’ve resisted upgrading to recent versions of Fedora/CentOS for a long time.  The main reason is that I hate NetworkManager.  It does to much automatically; I much preferred the old ‘network’ daemon that could easily be manually set.  For instance if I create a Bridge(call it bridge1) interface assigned to my second Ethernet card(eth1) NetworkManager will automatically create a profile for each with automatic startup and DHCP enabled!  I don’t need or want a DHCP lease on either side of a bridged interface!  Among other issues are the creation of duplicate profiles when libvirt restarts.  So NetworkManger reports ‘bridge1’ & ‘bridge1’ in the NM start menu applet.

Ideally libvirt and NetworkManager would work hand in hand because Redhat sponsors both projects…

In this article we will describe the steps to allow you to connect two seperate NIC’s to a switch; assigning one of the NIC’s specifically to guest VM’s.

Goals of this post:

  • Set NetworkManager to ignore bridge and Ethernet device
  • enable systemd version of rc.local boot script to create bridge at boot
  • assign host to specific bridged Ethernet device



How to Provision Global Settings using Polycom 4.0 Firmware


Recently I’ve been tasked with figuring out how to provision Polycom phones on the 4.0 firmware.  I’ve resisted for some time because of our existing GUI and templates.  However, the time has come to make the transition.  This tutorial will cover how to create a custom settings file that used to make up sip.cfg.  We will define our own ‘global options’ config referenced from  00000000000-phone.cfg.


Goals of this Post:

  • Create custom global options for Polycom 4.0 firmware



Written by mattb in: Asterisk,Asterisk Post,Linux | Tags: , ,

Civilization V on Fedora 20

It’s a dream come true.  Civ V on Linux!!!!!!!!!!   Let me just say this: OMG, OMG, OMG, OMG….!  Okay, deep breath.

I love Civ, but my current situation only allows one computer, so I have to swap drives and boot Windows to play my most favorite of games.  It’s huge bummer, because it disrupts my work flow, but that’s all changed.  Steam is and Firaxis are incredibly wise to offer an “A” game to the small(but growing Desktop Linux community).  I’m playing a single player game and will report back soon!

Written by mattb in: Linux |

Asterisk 1.8 T1 w/ PRI + analog fax

It’s been a while since I posted, so I want to come out swinging.  I recently put together a phone system for a medium office.  They have a standard T1 and a 4 port FXS Digium card.  The analog card is for a PA system and two fax machines.  This post is a quick tutorial with examples for installation.

Goals of this post:

  • Configure Digium T1 w/ PRI
  • Configure Analog card channels
  • Asterisk Dahdi setup

This tutorial assumes you have a somewhat recent working build of libpri, dahdi, and Asterisk.



Fedora 15, 16, 17, 18 missing system-config-network GUI – SOLVED

Recently Fedora has been a nightmare for me. Anyone that’s seen(the fairly new) GNOME 3 knows what I’m talking about.  Their design team must have dreamed up the next iteration of GNOME with only a tablet in mind.  The giant icons and dependency on keyboard shortcuts make it a must for a 7″ inch screen and a few swipes.

For daily use on desktop computers at work GNOME 3 is garbage though – everyone hates it. It’s barely better than the Windows 8 interface.  I’m sorry; yeah I went there, and I only say that because Microsoft jammed all those tiles and the desktop into the same freaking UI.  Even GNOME 3 designers missed that pit of snakes!

But happy days are here again! I have found(with some tweaking) the MATE Desktop offers a very similar but updated version of the GNOME 2 desktop I loved in Fedora 14.  One nagging problem is that I hate NetworkManager for server use.  It’s okay for laptops, but when I need to custom edit some interfaces for a Asterisk PBX or Virtual Server I want the good ol’ ‘system-config-network’ over a SSH -X session.  After a quick ‘yum install system-config-network’ I thought I was in business… only to discover that only the command line version was installed.  After a little googling I discovered a utility that could download the source package.  I rebuilt the package with ‘–with gui’ switch as suggested on a forum.  The result produced the ‘system-config-network-tui-1.6.10-1.fc18.noarch.rpm’.  I installed the packaged and the GUI works! This tutorial uses Fedora 18, but could be adapted for 15,16,17, and 19.



Agent Auto log-off script for Asterisk

Many times an Agent will forget to logoff. This can cause call routing, payroll, and queue statistic problems with Asterisk. With a handy BASH script it is easy to log all the agents out the queues automatically. Below is the shell script and an example of the crontab entry for execution at 6:00 PM every day.


Written by mattb in: Asterisk,Scripts | Tags: , , ,

Ping Test script

The script below records a ping results every 3 seconds to /var/log/ping.log.  I created this script to detemine if my NIC is losing conectivity with switch at the same time as Asterisk SIP peers are lagging out.  Enjoy!


Written by mattb in: Asterisk,Asterisk Post,Linux | Tags: , , ,

How to Start Cinnamon desktop from Run Level Three on Fedora 16

Fedora 16

The default UI on Gnome 3 is Bad.  Everyone knows it.  I’ve been running Fedora 14 for what seems like years, hoping that one day the Gnome development team pulls their heads out of their collective asses and restores a simple, low impact interface.  Instead, as of Fedora 16,  I still see these gigantic window title bars, huge ugly icons, lack of minimize and maximize buttons.  What’s next?  Tiles?  Honestly it looks like Gnome 3 was designed for a cell phone.  Or maybe on a cell phone.

Luckily the folks at Mint Linux have been working on a Gnome 3 variant with a sane UI.  One that look like a traditional, but stylish desktop.  I installed Fedora 16 and tried Cinnamon.  While Gnome 2 on Fedora 14 is still more refined, I really like the direction this project is headed.  One problem that vexed me is how to start Cinnamon from run level 3(terminal).

Purpose of this post:

  1. Install cinnamon
  2. create .xinitrc for startx to work


Written by mattb in: Linux | Tags: , , , , , , ,

Fedora 14 PHP daemon error

I’m using PHP to create a daemon(system process) that listens for request to dial outbound calls from a Asterisk based dialer.  Before I even got started I got the following error:

[root@AsteriskPBX Desktop]# php daemon.php
PHP Fatal error: Uncaught System_Daemon_Exception: PHP is compiled without –enable-posix directive in /root/Desktop/daemon.php on line 6

Many websites suggest recompiling PHP or installing ‘php-posix’, which isn’t in the Fedora repo. After some searching I found that ‘php-posix’ is part of the ‘php-process’ package in Fedora.  It now works!


Written by mattb in: Uncategorized |

Asterisk: Holiday Macro

Below is an example of a macro that checks to see if the ‘holiday’ menu is enabled.  I also added extension 2970, a ‘one touch’ utility to enable/disable the holiday macro.  Remember to create a ‘holiday_disabled.wav’ that literally says, “Holiday menu disabled”.  To rercord a message simply disable and enable the utility again.  Enjoy!




;Check if holiday message set

;Check if it is a holiday
exten => s,1,NoOp(Check for Holidays)
exten => s,n,Answer()
exten => s,n,set(HOLIDAY=${DB(closed/1)})
exten => s,n,NoOp(${HOLIDAY})
exten => s,n,gotoIf($[“${HOLIDAY}” = “1”]?main-holiday,s,1)   ; Custom Holiday

exten => s,n,gotoiftime(08:00-19:00,mon-fri,*,*?${ARG1},s,1) ; Main Operating Hours
exten => s,n,goto(${ARG2},s,3)



; usage: macro(holiday,ARG1,ARG2)
; argument one and two are that day and night menu
; Some DID

exten => 12134974061,1,macro(holiday,main-day,main-night)


; One touch Record/Set Holiday Closed Message
exten => 2970,1,NoOp(============ Set Holiday Message ==============)
;exten => 2970,1,authenticate(5678)
exten => 2970,n,Wait(1)

; check to see if holiday message is set
exten => 2970,n,set(HOLIDAY=${DB(closed/1)})
exten => 2970,n,NoOp(${HOLIDAY})
exten => 2970,n,NoOp(${HOLIDAY})
exten => 2970,n,NoOp(${DB(closed/1)})
exten => 2970,n,gotoIf($[“${HOLIDAY}”=”1”]?utilities,2970(disable),1:utilities,2970(enable),1)

; if disabled record a new greeting
exten => 2970(enable),1,Record(en/custom/holiday_message:gsm)
exten => 2970(enable),n,Wait(1)
exten => 2970(enable),n,set(DB(closed/1)=1)
exten => 2970(enable),n,Playback(en/custom/holiday_message)
exten => 2970(enable),n,wait(1)
exten => 2970(enable),n,Hangup

; disable the holiday message and alert the caller

exten => 2970(disable),1,set(DB(closed/1)=0)
exten => 2970(disable),n,Playback(en/custom/holiday_disabled)
exten => 2970(disable),n,Hangup