{"id":86,"date":"2011-02-15T16:51:00","date_gmt":"2011-02-15T23:51:00","guid":{"rendered":"http:\/\/www.petesworkshop.com\/blog_wp\/?p=86"},"modified":"2011-02-15T16:51:00","modified_gmt":"2011-02-15T23:51:00","slug":"one-more-time-with-asterisk","status":"publish","type":"post","link":"https:\/\/www.petesworkshop.com\/blog_wp\/?p=86","title":{"rendered":"One more time with Asterisk"},"content":{"rendered":"<p>A long while ago, maybe 4 years ago, I installed Asterisk, an open source voice mail and call management system.\u00a0 It is a little bit of overkill for a small office like mine and although I also host my home voicemail on it, it really isn&#8217;t a necessity.\u00a0 But I installed it to get familiar with it in anticipation using it as the IVR engine in my attendance management system. It has worked well but after two hacking experiences in the past 6 months I figured it was time to upgrade and perhaps find an easier way to install and manage it.\u00a0 AsteriskNow is a &#8220;pre-packaged&#8221; installation of Asterisk and a Linux distro called CentOS and is supposed to make the whole experience easy and painless.<\/p>\n<p>In my first attempt I chose to install Asterisk with a web GUI called FreePBX.\u00a0 The installation was a no brainer.\u00a0 Skills required are the ability to push the open\/close drawer button on the CD\/DVD drive and be able to use a keyboard. If you can&#8217;t do that you shouldn&#8217;t be near a computer in the first place.\u00a0 I will say this: AsteriskNow is by far the easiest way to get an Asterisk installation installed on Linux.\u00a0 Period.\u00a0 It is perfect.\u00a0 But the EASY part stops there.<\/p>\n<p>First a little background on configuring Asterisk.\u00a0 Everything is handled by configuration files. Everything!\u00a0 For Linux geeks this is nirvana.\u00a0 Grab your favorite text editor and away you go.\u00a0 The default installation of AsteriskNow includes no desktop application so you will be hacking files with a command line text editor (whoopee!).\u00a0 My first go around with Asterisk four years ago took just that approach.\u00a0 Tediously configuring Asterisk using a text editor and a lot of luck.\u00a0 The good news here is that there is plenty of good documentation on how the files all hang together.\u00a0 The bad news is that if you fat-finger something it can take hours to sort out just where you went wrong.\u00a0\u00a0 Enter FreePBX and Asterisk GUI!\u00a0 These web front ends are designed to make the whole thing quick and easy.<\/p>\n<p>After my first install of AsteriskNow\/FreePBX I brought up the web interface and then did a quick search to find the step by step documentation on how to use the GUI to configure Asterisk.\u00a0 Nada! Everything I came across was incomplete or out of date so after poking around for an afternoon, I decided to give up and reload, this time with Asterisk GUI as the web front end.<\/p>\n<p>At least Asterisk GUI uses the base Asterisk config files AND the Asterisk GUI has an easy way to get logged in and change the admin&#8217;s password (which was almost impossible to do with ease using FreePBX).\u00a0 So I was off and running!\u00a0 The menu layout from top to bottom is basically the &#8216;step by step&#8217; so I moved down the menu tree working through the config.\u00a0 The context help is good but again there is VERY little documentation on how to use the GUI and the few places I got stuck I really was stuck.<\/p>\n<p>I finally got most of the steps completed but I couldn&#8217;t make any outbound calls (I *could* call other extensions) and none of my inbound calling was working either.\u00a0 In frustration I posted some of my questions to the Asterisk forum (which happened to be unusually responsive) and got to the point where I just decided to reload.\u00a0 Which I did.\u00a0 I made a couple of tweaks, broke it again, and reloaded again (see, it really IS easy to install, thank goodness).\u00a0 And then using all I had learned in the prior attempts, made one last effort to sort out my issues.\u00a0 Here is what it came down to:<\/p>\n<p>I was thrown by the Module Name on the hardware config page.\u00a0 It had &#8216;wctdm24xxp&#8217; which seemed to point to a different card than I had installed (TDM400p).\u00a0 Based on the Asterisk forum I changed it to &#8216;wctdm&#8217; which was supposedly the correct module name for my card but every time I did that and rebooted it basically hosed up my install.\u00a0 So, DON&#8217;T change it!<\/p>\n<p>I tracked down my issues with the inbound and outbound calls to an incorrect configuration that the Asterisk GUI was placing in the extensions.conf file. So it was back to editing the config files manually!\u00a0 In the globals section, the GUI had configured the two trunks I had as trunk_1 = DAHDI\/1 and trunk_2 = DAHDI\/2 I think those should have been either DAHDI\/G1 and DAHDI\/G2 OR I just set them to DAHDI\/3 and DAHDI\/4 which should point them directly to my FXO ports 3 and 4.\u00a0 The G1\/G2 syntax is to automatically chose the highest available ports but something is broken there.<\/p>\n<p>The second issue I had with the inbound calling was that two entries that Asterisk GUI added to the contexts broke the inbound answering.\u00a0 Those two entries are:<\/p>\n<p>exten = s,1,ExecIf($[ &#8220;${CALLERID(num)}&#8221;=&#8221;&#8221; ]?SetCallerPres(unavailable))<br \/>\nexten = s,1,ExecIf($[ &#8220;${CALLERID(num)}&#8221;=&#8221;&#8221; ]?Set(CALLERID(all)=unknown &lt;0000000&gt;))<\/p>\n<p>I just commented them out.\u00a0 Not sure what those commands do, except break the inbound contexts I had.<\/p>\n<p>With those things out of the way, the rest of Asterisk GUI really DOES make it easier to manage your Asterisk installation but, MAN!, you really have to stick with it.\u00a0 I haven&#8217;t had a chance to explore any other features yet; I have already flushed the better part of two days sorting out the GUI.\u00a0 But, all is well now. So, call me (and you&#8217;ll get my voicemail!)<\/p>\n<p>The next steps are to go back and secure the server again before I open it back up to the Internet.\u00a0 The bad guys are always knocking&#8230;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A long while ago, maybe 4 years ago, I installed Asterisk, an open source voice mail and call management system.\u00a0 It is a little bit of overkill for a small office like mine and although I also host my home &hellip; <a href=\"https:\/\/www.petesworkshop.com\/blog_wp\/?p=86\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=86"}],"version-history":[{"count":1,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/86\/revisions"}],"predecessor-version":[{"id":87,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/86\/revisions\/87"}],"wp:attachment":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}