This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
It appears there is a nasty bug in certain versions of PHP (almost certainly in version 5.3.3, and perhaps other versions as well) that can cause SOME inbound and outbound routes in FreePBX to be ignored. Add this to the list of difficulties to plague some FreePBX users, but for once it’s not something the FreePBX developers did.
The symptom appears to be that you have an inbound route with a DID that starts with the number “2”, or an Asterisk Phonebook entry that starts with a “2”, but it doesn’t work as expected or gets changed to a negative number. Not all patterns starting with “2” appear to be affected, but ten digit numbers in certain area codes (such as 248 here in Michigan) definitely are. In the case of inbound routes, it appears that the numbers get stored in the MySQL database correctly, but when they get written out to extensions_additional.conf (the dialplan file that F—PBX generates for Asterisk to use) they get transformed into negative numbers. Therefore, when a call comes in on that DID, Asterisk doesn’t recognize it and the call gets dropped (or if you accept calls for any DID then it’s handled as such a call, but a warning message is posted to the CLI and the log file).
For a discussion of this issue, see these threads in the PBX in a Flash forum:
Just wanted to alert you to this in case you happen to have the buggy PHP version and things just aren’t working as they should be. The best fix is probably to upgrade PHP to a later version but that can cause other issues, or you may encounter unmet dependencies when trying to upgrade (in fact, if you come across a foolproof way to upgrade PHP on Centos, please let us know). If you are using PBX in a Flash, they’re aware of the issue and one would hope they’ll have a fix real soon now. If you are using any other FreePBX-based distro then you will have to bug the distributors of that distro for a fix. If you rolled your own, then good luck to you in upgrading PHP!
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
I just wanted to call your attention to this thread on the PBX in a Flash forum:
This thread explores the possibility of adding a simple speech to text demo, and also discusses the possibility of transcribing e-mails to text. It uses Google’s speech recognition service, and it is free to use. I doubt you would be free to use it in any commercial application, but for those that just like to tinker with new capabilities for your Asterisk server, you might find this interesting.
I haven’t personally tried it yet, but I will say that if you are using some FreePBX based distro other than PBX in a Flash, you may need to remove the calls to the Flite speech synthesizer (or install Flite support). I hate Flite (I think the voice quality sucks harder than a black hole — okay, maybe I exaggerate a little, but Cepstral voice synthesis is much better than Flite — unfortunately Cepstral is not free) so I’m not going to tell you how to install it. Flite’s only used in the demo in the first post so if you are trying to do something else (such as attempt voicemail transcription, as discussed in the thread) you probably don’t need it anyway.
What would be nice would be the ability to dial a code, record a short message, and then have a transcription e-mailed to the address you use for voicemail notifications. THAT is something I’d actually use on occasion!
EDIT: After posting this, I tried a basic installation on a NON-PBX in a Flash system. Besides removing the references to Flite, I found I had to do the following:
Change ownership of /var/lib/asterisk/agi-bin/speech-recog.agi to asterisk:asterisk
Install the perl modules mentioned in the “use” statements in /var/lib/asterisk/agi-bin/speech-recog.agi
Install flac (some users may also need to install sox, but I had installed that previously).
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
I have been having a problem with a couple of different USB devices that I occasionally connect to my Mac. I would attempt to eject them and they would immediately remount themselves. Therefore, it was almost impossible to do a “clean” disconnect of the device. If you’ve had this problem you’ll know exactly what I’m talking about, and if you haven’t then you don’t need this article. If you choose to use the information here, bear in mind that even though it worked for me I have no idea what it will do on your system, so use at your own risk or don’t use it at all!
I found that I could “Unmount” rather than “Eject” the devices using Disk Utility and then they would not automatically remount, but it was a bit of a pain to have to go to Disk Utility every time I wanted to unmount a device. Automator to the rescue! Here are the three steps to create and use an “Unmount” service in OS X:
1. Fire up the Automator application and when it comes up, tell it you want to create a Service:
2. Create an Automator workflow exactly as shown here (click on the image to enlarge it). Note that the top part must say “Service receives selected Folders in Finder” and after that there is one step, “Run Shell Script”, in which you’ll pass input as arguments. In the text field simply put hdiutil unmount $1
Save the workflow using an appropriate filename (I suggest “Unmount”). It will be saved in your ~/Library/Services/ directory.
3. To use the service, open your /Volumes directory in Finder and select the volume you want to unmount, and right-click on it (or however you bring up the context menu in Finder on your system). Near the bottom you should see a menu selection for “Services” and in a sub-menu you should find your “Unmount” service:
Click on that and your volume should be unmounted (if you have Hardware Growler installed from any version of Growl, including the free forked Lion version, then you should get a Growl notification of the unmount). I will note that this has no error checking other than that built into the command-line hdiutil program, so while it probably won’t hurt anything if you try to unmount something that’s not unmountable (such as a file), I’d still try to be careful.
If you have a problem with devices that refuse to unmount the then you could use the same procedure to create a “Force Unmount” service. I’d still create the regular “Unmount” service as shown above, but if you sometimes have the problem that the device won’t unmount the normal way then simply follow the above steps again except name the service “Force Unmount” and add the -force flag, like this:
hdiutil unmount -force $1
Or if eject normally works, but sometimes you want to force it, you could create a “Force Elect” service using:
hdiutil eject -force $1
I do not guarantee anything with regard to the use of the -force option (I read about it here), so if you go that route and lose data, don’t blame me. As I said, you use this stuff at your own risk.
Happy unmounting! And if this doesn’t work for you the way it worked for me, I’ll tell you up front that I have no clue why, and that’s partly because I don’t understand why a plain old eject attempt fails on some systems (as I say, eject actually does work, but then the device immediately remounts). It’s all a mystery to me!
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
Episode 47 – Fork You Growl! Interview with Perry Metzger (from The Basement Coders Developer Podcast — if you care at all about Growl you should listen to this, preferably before spending any money on their allegedly broken App).
EDIT: Link to Growl Source Installation information for Growl 1.3 — it appears that after the Slashdot article was published, the Growl developers decided to release the source to Growl 1.3 (making the headline of the Slashdot article and this article inaccurate in the process). However, this does not mean that the problems with the new version have been fixed (as of the date of this article) — it probably only means that they didn’t like the bad publicity about not releasing the source and decided to address that issue, in an attempt to blunt some of the criticism.
I’m presenting the above links so that anyone interested can check them out (and so I can find them again in the future). I will just say that I generally agree with the sentiments expressed in the podcast. I think it’s really underhanded when a project that has been free for years (and has accepted contributions of both cash and code from folks that probably thought it would be free forever) tries to go commercial, and it’s even worse when the commercial app doesn’t work as well as the previous free version. And I won’t even get into the issue of the censorship, because the Growl developers have the right to censor whomever they want in their forums, but in this case it sure sounds like they were trying to deprive their users of the knowledge that someone else had fixed their buggy code and made it freely available. If they choose to do that, then it’s up to others (like you and I) to let Growl users know that an alternative exists.
I hope that either the forked version gains acceptance (and exposure, since few people seem to know about it at the moment) or the original Growl developers see the error of their ways sooner rather than later. What IS it with developers turning greedy lately? Keep in mind that had Growl not existed (and worked so well in its previous free incarnation), it’s quite likely that the Apple folks would have developed their own notification system and made it a component of OS X.
EDIT: Two things you should know about Growl 1.3 before you fork over your two bucks: First, due to App Store requirements, it no longer installs as a preference pane in System Preferences – it’s now an application (the podcast explains this in more detail). And second, “Growl 1.3 and later do not have update checkers built into them, so you will need to keep up with when releases are put out”, according to the Growl Source Installation page.
Full disclosure: I also censor comments — see my comment policy in the right sidebar — but it’s generally because they are spam or include one or more links that I consider spam, or because someone is being rude and nasty. You can call me all the names you like, but I’m not going to approve such garbage for others to read. However, there are right reasons and wrong reasons to censor comments or to ban a user, and I’ll leave it to the reader to decide (after listening to the linked podcast, which I strongly recommend before you form any strong opinions on this) whether the Growl folks should have banned Mr. Metzger.
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
If you run Asterisk you may have encountered this issue: Your Internet connection goes down, and so does your ability to call from extension to extension, even between extensions on your local network. This is a long-standing bug in Asterisk (exactly the sort of bug that drives people to try alternatives such as FreeSWITCH) but let’s say that for whatever reason you need to stick with Asterisk, so you’d like to find a way to make that bug go away. Without going into all the technical details, the reason that calls fail is that Asterisk can’t access a DNS server. I’ve read several reports that say the easiest solution is to install the BIND DNS server on the same machine as your Asterisk server. If you are also running Webmin on the server, installing and configuring BIND is a relative piece of cake. So here’s how it’s done. Please note that most of the images below can be enlarged by clicking on them, and that I have installed the StressFree theme in Webmin, so if it looks a little different from what you’re used to seeing, that’s probably why.
To start with, log into Webmin, click on “Servers”, then click on “BIND DNS Server” (if you don’t find it there, try looking in “Un-used Modules”):
Assuming you have not previously installed BIND, you’ll get a screen like this. Just click where it says “Click here”:
You will then see this screen come up as BIND is installed. Just let it run to completion and (assuming it installs successfully) click on “Return to BIND DNS Server” at the bottom of the page:
Next, because you don’t yet have an /etc/named.conf file, you’ll see this page. Click the button for “Setup nameserver for internal non-internet use only” (don’t worry, we’ll fix it in the next steps), then click the bar that says “Create Primary Configuration File and Start Nameserver”:
At this point BIND is installed and running, but it probably isn’t doing what you want it to, and your system isn’t using it. So the first thing we need to do is tell it where to go when it needs to do a DNS lookup. You should be seeing a page that looks like this — click on “Forwarding and Transfers”:
When you get to the following screen, check “Yes” next to “Lookup directly if forwarders cannot?” You also need to enter one or more addresses of DNS servers that BIND can access when it needs to pull a DNS record. You might want to give some thought to which DNS servers you want to use, and in what order, before you start entering them. You can enter up to three IP addresses of DNS servers, and then click “Save”. This will throw you out to the previous screen, and if by some chance you want to enter even more DNS servers, you can click on “Forwarding and Transfers” again to come back and enter up to three more servers, until you are finished. In this example, I have already entered the IP addresses of my router’s DNS Server as the top priority pick, followed by two Google DNS Server addresses.
Once you have done this, you are through configuring BIND directly, but there are two more things we need to do. The first is to make sure that the BIND server starts each time we restart the machine. To do that, go to Webmin’s “System” page and then click on “Bootup and Shutdown”:
This is a long page so I’m not showing all of it — what you have to do is find the entry for named and check the box next to it:
Then go to the bottom of the page and click “Start on Boot”:
At this point BIND is running, and should be using the correct DNS servers, and is set to start at bootup, but your server still isn’t using it for its DNS queries. To get it to do that, go to Webmin’s “Networking” page and click on “Network Configuration”:
Once on the Network Configuration page, click on “Hostname and DNS Client”:
Once on the Hostname and DNS Client page, what you need to do is make the first entry in the DNS Servers list 127.0.0.1. If you trust BIND to always be operating, that’s the only entry you need. I didn’t quite trust BIND that much (actually, what I didn’t trust was my ability to set this up correctly) so I set the DNS server in the router as the secondary DNS address. You could use any DNS server as the secondary, or you could choose to just enter the 127.0.0.1 address to use BIND and let it go at that. Personally, I feel a lot more comfortable having a “fallback” DNS. Don’t forget to click “Save” when you are finished making changes here:
That’s all there is to it, as far as I know (if you think I’ve missed anything or done something wrong, the comment section is open!). If you’re like me, the next question you will have is, “How do I know it’s working?” And the easiest way to do that is to go to a Linux command prompt and “dig” some site you have not been to recently twice in a row. Here’s an example, using cnn.com — the part we are interested in is in red:
;; ANSWER SECTION: cnn.com. 287 IN A 157.166.224.25 cnn.com. 287 IN A 157.166.224.26 cnn.com. 287 IN A 157.166.226.25 cnn.com. 287 IN A 157.166.226.26 cnn.com. 287 IN A 157.166.255.18 cnn.com. 287 IN A 157.166.255.19
;; AUTHORITY SECTION: . 76691 IN NS i.root-servers.net. . 76691 IN NS j.root-servers.net. . 76691 IN NS k.root-servers.net. . 76691 IN NS l.root-servers.net. . 76691 IN NS m.root-servers.net. . 76691 IN NS a.root-servers.net. . 76691 IN NS b.root-servers.net. . 76691 IN NS c.root-servers.net. . 76691 IN NS d.root-servers.net. . 76691 IN NS e.root-servers.net. . 76691 IN NS f.root-servers.net. . 76691 IN NS g.root-servers.net. . 76691 IN NS h.root-servers.net.
;; ADDITIONAL SECTION: b.root-servers.net. 386178 IN A 192.228.79.201 d.root-servers.net. 402826 IN A 128.8.10.90 d.root-servers.net. 230000 IN AAAA 2001:500:2d::d f.root-servers.net. 370827 IN A 192.5.5.241 g.root-servers.net. 463754 IN A 192.112.36.4 h.root-servers.net. 374116 IN A 128.63.2.53 h.root-servers.net. 517382 IN AAAA 2001:500:1::803f:235 j.root-servers.net. 185528 IN A 192.58.128.30 j.root-servers.net. 578747 IN AAAA 2001:503:c27::2:30
;; ANSWER SECTION: cnn.com. 223 IN A 157.166.255.19 cnn.com. 223 IN A 157.166.224.25 cnn.com. 223 IN A 157.166.224.26 cnn.com. 223 IN A 157.166.226.25 cnn.com. 223 IN A 157.166.226.26 cnn.com. 223 IN A 157.166.255.18
;; AUTHORITY SECTION: . 76627 IN NS c.root-servers.net. . 76627 IN NS d.root-servers.net. . 76627 IN NS e.root-servers.net. . 76627 IN NS f.root-servers.net. . 76627 IN NS g.root-servers.net. . 76627 IN NS h.root-servers.net. . 76627 IN NS i.root-servers.net. . 76627 IN NS j.root-servers.net. . 76627 IN NS k.root-servers.net. . 76627 IN NS l.root-servers.net. . 76627 IN NS m.root-servers.net. . 76627 IN NS a.root-servers.net. . 76627 IN NS b.root-servers.net.
;; ADDITIONAL SECTION: b.root-servers.net. 386114 IN A 192.228.79.201 d.root-servers.net. 402762 IN A 128.8.10.90 d.root-servers.net. 229936 IN AAAA 2001:500:2d::d f.root-servers.net. 370763 IN A 192.5.5.241 g.root-servers.net. 463690 IN A 192.112.36.4 h.root-servers.net. 374052 IN A 128.63.2.53 h.root-servers.net. 517318 IN AAAA 2001:500:1::803f:235 j.root-servers.net. 185464 IN A 192.58.128.30 j.root-servers.net. 578683 IN AAAA 2001:503:c27::2:30
Notice how on the first run, it takes 26 msec to do the lookup, because BIND doesn’t have that address cached yet, whereas on the second run it only takes 1 msec to do the lookup! Could that perhaps improve system performance? I’ll bet it could! And the SERVER line tells us that it is indeed using our BIND server (127.0.0.1) – if it were using, say, our router’s DNS server then that line would show this:
;; SERVER: 192.168.0.1#53(192.168.0.1)
The idea here is that when your Internet connection takes a dive, Asterisk will still be finding a working DNS server and therefore won’t tank. That, at least, is the theory I’ve seen on several web sites. The ONLY thing I am showing here is how to set up BIND using Webmin, and I won’t even guarantee that I’m doing that 100% correctly. I definitely do not guarantee that it will actually work as intended — you’ll have to test that yourself. Doing a real test would mean disconnecting your cable or DSL modem, etc. from your router for several hours or days to see if the phones continue to work, and in most households or businesses that idea will go over like a lead balloon. However, feel free to give it a good test if you like and report the results in the comments.
You may wonder why I selected “Setup nameserver for internal non-internet use only” in the fourth screenshot. Obviously, that description is not entirely accurate. The real difference is that if you select that instead of the default “Setup as an internet name server, and download root server information”, it won’t create a “root” DNS zone, which you simply don’t need for this application. You can use the other option if you want to, but it will download additional information and increase the complexity of your setup. Either way, you should be able to access the Internet, because we set up DNS forwarding. If by some chance this BIND server is going to act as a nameserver for your entire network, and you don’t mind the additional traffic and complexity (and it’s the additional traffic that scares me the most, since I have no idea what it’s actually downloading nor how often it’s doing it), then by all means feel free to use the second option. All I will say is that I used the first. and it works fine, and I’ve seen at least one instance where this same thing is set up using a method other than Webmin, and except for the order of statements it uses an /etc/named.conf file that is identical to what Webmin produces when configured as I have shown here (in other words, no “zones” at all). I’m just waiting for some Linux purist to say this isn’t the “right” way to do this but keep the goal in mind here — all we are trying to do is work around a bug in Asterisk that should have been fixed years ago, not set up a DNS server to feed an entire subnet. But again, you can feel free to use whichever of the options you like — it should work either way.
(By the way, if after reading the above you have “setup remorse” — you know, that feeling you get after you’ve installed something that you should have picked a different option — you can get a “do-over” by simply deleting or moving/renaming /etc/named.conf. If you then exit Webmin’s BIND module and come back in, it should see that named.conf doesn’t exist and start you over at the fourth screen shown above. Of course, you will lose anything you have already configured from within that module. If you originally selected the option to download the root server information, I think that’s at least partly stored in the file /etc/db.cache, so you could move or remove that file to make sure it’s not used, however I’m not sure if any other files are or were also downloaded. That particular file is very small so I’m not worried about that one per se, it’s just that the way things are worded on a couple of pages I read, I don’t know if that’s all it downloads, or if at some point in the middle of the night it rises up and tried to cache all the DNS information for the Internet, or just exactly what it does. Sometimes I wish people would just give a sentence or two of additional information, so you have a better idea of what’s the right thing to do when you’re setting up something like this.)
Now, if you are a True Linux Geek who somehow stumbled across this article, and are disappointed that it isn’t much more complicated, I’ll refer you to this page. If you can figure all THAT out, you should be getting paid the big bucks as the networking expert that you are! 🙂
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
Here’s a program that may be useful for those of you who, like me, sometimes find ourselves at a Linux command prompt trying to recall the syntax of a command we use frequently (because, you know, it would never have occurred to the designers of Linux to actually implement commands with names that have a clear meaning in plain English):
Alias are a great tool to help increment your productivity on the terminal with bash (or any shell program you’re using), but usually we are too lazy to think at what are the most common, or long commands that we use frequently and prepare an alias for them.
And so someone has done a small piece of software to do this job: aliaser
Aliaser helps you identify frequently typed commands and creates bash aliases for them. Aliaser analyses your bash history and helps you identify commands that you use frequently.
One thing they forgot to mention is that once you’ve added an alias, it won’t actually be available for use until you log out and then log back in. Also, you can delete the aliaser file and temporary directory from your /tmp directory once installation is complete. If you ever want to uninstall aliaser, just remove the three lines added to your .bashrc file, remove the ~/.aliaser directory, and remove the /usr/bin/aliaser file.
One way I find this useful is to make commands I can’t remember into ones that that I can remember. For example, I did this:
aliaser add processes “ps awx”
The Linux purists are probably rushing to comment that I just turned a six character command into a nine character one. Yes, BUT, I can actually remember the word “processes”, whereas I cannot remember the options I need to use after “ps” to get the output I want. The designers of Linux seem to not realize that some of us users have really bad memories. Another use for this is turning arcane Linux commands into the equivalent Windows commands that you’re familiar with. You could do this:
aliaser add dir “ls -al”
So that when you type “dir”, you get a directory listing similar to what you are used to.
If you can’t even remember the aliases you’ve created (yeah, my memory really is that bad some days), just use aliaser show to see all the aliases you’ve added.
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
If you are a Mac user, you’ve probably heard of Little Snitch. It’s a commercial (as in, not free) program that lets you allow or deny connections to the Internet from individual applications. One reason for using such a program is to detect software that should have no reason to connect to the Internet nevertheless attempting to do so. For example, you download a free screensaver (dumb move to start with) and it sends all the personal information it can find on you to some group of hackers on the other side of the world. A program like Little Snitch would let you know that the screensaver is trying to connect to the Internet, and allow you to deny that connection. In the Windows world, I believe that ZoneAlarm has a similar capability, and it’s also a commercial (as in, not free) program.
It appears that these is a similar program for Linux users, and it IS free! It’s called Leopard Flower and it’s described as a “Personal firewall for Linux OS (based on libnetfilter_queue) which allows to allow or deny Internet access on a per-application basis rather than on a port/protocol basis.”
Looking at the screenshot it appears to have very much the same per-application blocking functionality you’d get in one of those other programs. I have not personally tried it yet, but I wanted to create a post about it so if someday in the future I am trying to remember the name of this program, I’ll know where to find it (yes, this blog does sort of serve as my long-term memory!). 🙂
The only downside to this one is that as of this writing the only available package is for Arch Linux but if you want to try to build it for a Ubuntu or Debian system, they provide a page showing the needed dependencies.
There is an older similar program called TuxGuardian but apparently is hasn’t been updated since 2006, so I have no idea if it will even work with current versions of Linux. And as for you Android users, try the NoRoot Firewall app.
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
I’ve seen this happen several times now on Ubuntu-Linux based systems that have NVIDIA graphics. What happens is that “Update Manager” pops up and tell you there are updates for your software, and you accept them. It then tells you that your system has to be rebooted. And when you do that, you get no video, or text only. What probably happened was that the updates you installed included an update to the Linux kernel, and the NVIDIA graphics driver currently installed on the system was compiled against the OLD kernel.
Note that this generally can only happen if you manually updated the NVIDIA graphics driver at some point. If you always installed it from the standard repositories for your distribution, you’ll probably never see this issue. So a word to the wise — when you finally get around to doing an upgrade of your Linux distribution, try to avoid manually installing the NVIDIA graphics driver. Instead, let the distribution pull it from its repository. After that, you should not have this issue in the future. By the way, if you currently are running Ubuntu, we recommend upgrading to Linux Mint rather than a newer version of Ubuntu. Linux Mint is very similar to Ubuntu, but leaves out some of the things that users seem to hate about newer releases of Ubuntu. More to the point, they are not currently talking about switching their base graphics system from the X window server system to a new display manager, which I have a feeling might cause problems for some NVIDIA graphics users.
But if you’re not yet ready to do a full reinstall of Linux, the fix for this problem is easy IF you had the foresight to set up SSH access to your Linux system BEFORE the trouble started. If you didn’t, and you’re not a true Linux geek, you may be kind of screwed. So if you’re reading this and your system is working fine, and you haven’t yet set up SSH access, you may want to do that. There are several sites that tell you how to do that; here are two that I found using Google:
If you didn’t do this beforehand, you may still be able to do it if you can get to a command prompt.
Anyway, the actual fix is to (re-)install the latest NVIDIA driver for your system. They will be compiled against the new Linux kernel and then everything should work fine. To find the correct NVIDIA driver, go to the NVIDIA Driver Downloads page, and use the dropdowns to select the correct driver for your system. Download it to your local system, then upload it to your Linux PC (if you have SSH access working then you can use an SFTP client, such as WinSCP or Transmit, to upload your driver file). Once you have it on your PC, from a command prompt navigate to the directory where you put the driver and then change the permissions to make it executable:
sudo chmod +x driver_upgrade_script_filename
Now try running the script (it should have a .run extension):
sudo ./driver_upgrade_script_filename
It should not complain that the Gnome Display Manager or KDE Display Manager is running (if it were, you wouldn’t be in a state of near-panic right now), but if you were just doing a regular update you’d have to do this when the GDM/KDM is stopped. For a guide that covers that scenario, see How To Install Official Nvidia Drivers in Linux, or just know that to stop the display manager,
sudo /etc/init.d/gdm stop
should stop the Gnome Display Manager, or if you’re using KDE then the command would be
sudo /etc/init.d/kdm stop
Most sources I’ve seen suggest that you answer yes to any questions the installer may ask. The only one I’d be cautious about is letting it create a new xorg.conf if you are using a customized one (which you may well be if you’ve used any of my previous HTPC-related articles). If you have edited xorg.conf, then I’d make sure you at least have a backup before letting the installer create a new one, so you can revert back to your custom one (or compare the two and insert your customizations into the new one) if necessary.
Under Ubuntu, you may get a message similar to “Provided install script failed”. That will happen every time you update the NVIDIA driver this way and it is normal. Just ignore it and continue the installation. If you get “Error locating kernel source”, run sudo apt-get install kernel-source from the command prompt, then run the driver upgrade script again.
When the installer has successfully finished, reboot the system and when it comes back up, hopefully you should be happy again!
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
Note: This article was originally posted in August, 2011 and is very out-of-date.
This is just one of those things that I figured it might not hurt to put into a blog post so I can find it later if I ever need to. This is the procedure I use to upgrade Asterisk 1.8 when a new release appears that has a fix that I feel I need, or that closes a security hole. PBX in a Flash users should NOT do this, and FreePBX Distro users probably shouldn’t do this either, as you have your own respective upgrade mechanisms. This is for folks who have either built a system from scratch, or who (like me) started out with a distro but the decided to go your own way as far as upgrades are concerned. Note that I am only saying that this is how I do it. I am NOT telling you to do it this way, and if you do so you do it at your own risk.
There are the steps from the CentOS Linux command prompt. Some of them need further explanation and those have a footnote number next to them. Do NOT enter the footnote number from the command prompt! Also, in these examples I’m using Asterisk 1.8.5.0 (the current release version as I write this) as the version I’m installing, but you should go to http://downloads.asterisk.org/pub/telephony/asterisk/releases/ and find the current version and use that instead. If the lines overflow the width of the column, you should probably copy and paste the entire block into a text editor so that you can see the complete lines and know where the line breaks are supposed to be.
cd /usr/src
wget http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.5.0.tar.gz ¹
tar xvfz asterisk-1.8.5.0.tar.gz ¹
cd /usr/src/asterisk-1.8.5.0 ¹
make clean
contrib/scripts/get_mp3_source.sh
./configure
make menuselect ²
/root/stopnoise ³
make
make install
After doing this I find it’s easiest to just reboot the system to nip any “weirdness” in the bud. Some Linux purists will hate that idea (it seems to be a badge of pride among some of them to see how many days they can run a system without rebooting), and if you don’t want to reboot, feel free not to — it’s your system. Many people will stop Asterisk before starting the upgrade procedure by doing amportal stop at the beginning, and amportal start at the end, but since I usually reboot anyway I’ve never found the need to do that (the upgrade seems to go just fine even if Asterisk is running at the time, so I’m not sure why so many people think they have to stop Asterisk first — probably a case of one person did it, so everyone else follows like lemmings to the sea). However, if you don’t plan on rebooting, then you must stop and restart Asterisk to get it to use the upgraded version. If I want to only restart Asterisk for some reason, I usually go into the Asterisk CLI and do “core restart when convenient” so that the system will restart as soon as there are no calls in progress.
I do NOT use the flite synthesized voices (I can’t stand them; they are far too mechanical for my taste) so you won’t find any instructions here pertaining to those.
Now the footnotes:
¹ Use the correct version number for the version of Asterisk you are installing in place of 1.8.5.0
² When you run “make menuselect” it will bring up a menu that lets you select various options. You will want to pay attention to what is selected and what is not. Typically I need to make these changes:
Under Add-ons, I select everything EXCEPT chan_ooh323 — most of the others are required for FreePBX to function properly. Under Applications, I use the defaults. Under Bridging Modules through PBX Modules, everything that is not X’ed out is selected. Under Resource Modules everything that is not X’ed out is selected except res_pktccops (NOTE: If res_srtp has XXX next to it and you would like to enable SRTP support, stop here and read the note at the bottom of this article). Under Test Modules NOTHING is selected. Under Compiler Flags, LOADABLE_MODULES is selected by default and in addition I select G711_NEW_ALGORITHM and G711_REDUCED_BRANCHING. Under Voicemail Build Options through Module Embedding I just accept the defaults. Under Core Sound Packages through Extras Sound Packages I accept the defaults and also add the sounds corresponding to the language and codecs I use on my system (in my case the *-EN-WAV and *-EN-ULAW packages, and if I had any wideband endpoints I’d also use the *-EN-G722 packages). So, the only screens on which I make changes (in other words, I don’t just accept the defaults) are the Add-ons, Compiler Flags, and the three sound-related screens. Note that the Compiler Flags are just a personal preference (I just think the new algorithm may make G.711 calls a bit clearer) and the sounds MAY not need to be reloaded on every upgrade, but I’d rather be safe and include them, just in case some of the sound files have been updated.
³ This is a bash script I have in my /root directory that contained the following three lines prior to Asterisk 1.8.12.0:
If either or both of the phrases “doing dnsmgr_lookup for …” and/or “ast_get_srv: SRV lookup for …” are familiar (and annoying) to you, then you may want to use this script. Otherwise, you can just skip this instruction. For more information, see this thread in the PBX in a Flash forum.
NOTE REGARDING MISSING SRTP SUPPORT: It is possible to add this by following this procedure:
In your browser go to ftp://ftp.owlriver.com/pub/local/ORC/srtp/ (your browser must support the ftp protocol – try Firefox if yours doesn’t). You should see a file named srtp-1.4.4-1orc.src.rpm or perhaps a newer version. Download it and then move it to a directory (such as /tmp or /root) on your Asterisk server. Then do this, changing the version number if you got a different one:
cd (whatever directory you put the file into) rpm -ivh srtp-1.44-1orc.src.rpm
cd /usr/src/redhat/SOURCES/srtp
(If the srtp directory does not exist then cd /usr/src/redhat/SOURCES/ and tar xvf srtp-1.4.4.tgz) ./configure
make
make install
Then go back and restart the upgrade procedure, starting at the second cd … command and make clean. When you get to make menuselect, res_srtp should now be enabled. Note that this is not the only thing you need to do to make SRTP functional; at a bare minimum you would beed to add the line encryption=yes to the extension’s configuration, and even that would not be sufficient for some devices due to a so far unpatched bug in Asterisk. But, that is beyond the scope of this article.
This is an edited version of a post that originally appeared on a blog called The Michigan Telephone Blog, which was written by a friend before he decided to stop blogging. It is reposted with his permission. Comments dated before the year 2013 were originally posted to his blog.
FreePBX is NOT designed for multi-tenant use. Yet a lot of people will still try to, for example, run two small companies off the same FreePBX server. The question then invariably arises “How do I keep one company’s users from calling the other company’s extensions?”
Imagine I have extensions 100-110 and I name those CustomContext “GroupA” and I name 200-210 as “GroupB”. Can anyone tell me how I’d eliminate GroupA and GroupB from dialing each other?
And I replied as follows:
Create two new contexts in /etc/asterisk/extensions_custom.conf (just add these to the bottom of the file):
Go to the extension configuration page for each extension in Group A and change the context from from-internal to from-group-a.
Go to the extension configuration page for each extension in Group B and change the context from from-internal to from-group-b.
The way this works is if someone in Group A attempts to call an extension in the 200-299 range, OR if someone in Group B attempts to call an extension in the 100-199 range, the call is diverted to “congestion” (a fast busy signal). Otherwise, the call goes to the from-internal context and is processed in the normal way.
No nice way to do this from a GUI page, unfortunately. But, this is pretty simple, I think.
EDIT: There may be a slightly more elegant way to do this, that only involves adding ONE additional context to /etc/asterisk/extensions_custom.conf:
What I did not really go into in that reply is that this does NOT provide 100% separation. Although it prevents a user in one group from calling a user on the other directly, it does not address a host of other issues that could arise. Just as one example, there is nothing that would stop a user in “Group A” from transferring a call to a user in “Group B”. Did I mention that FreePBX is NOT designed to be a multi-tenant system?
Probably the best solution for multi-tenant use is to run separate installations of Asterisk and FreePBX for each tenant. You can run them on separate servers, or on separate Virtual Machines on the same server, but be careful if you do the latter, because some VM’s work better than others for the purpose. The PBX in a Flash folks would tell you, for example, that they’ve never had a problem running PBX in a Flash under Proxmox, but always seem to have issues if trying to run it under VMware. But others will say that with the right tweaks (and by installing VMware Tools) they’ve made it work under VMware. But I think that if you only have one server available, running two installs of Asterisk and FreePBX in Virtual Machines is better than trying to make FreePBX (and perhaps Asterisk itself) do something it is clearly not designed to do.
Recent Comments