{"id":174,"date":"2012-10-04T16:09:50","date_gmt":"2012-10-04T23:09:50","guid":{"rendered":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/?p=174"},"modified":"2012-11-01T11:19:57","modified_gmt":"2012-11-01T18:19:57","slug":"trixbox-is-dead-long-live-pbx-in-a-flash","status":"publish","type":"post","link":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/trixbox-is-dead-long-live-pbx-in-a-flash\/","title":{"rendered":"Trixbox is dead, long live PBX In A Flash"},"content":{"rendered":"<p>Three years ago, I wrote about <a href=\"https:\/\/blog.lemongrass.org.uk\/lemongrass\/2009\/10\/01\/making-asterisk-trixbox-work-in-the-uk\/\">making Trixbox work in the UK<\/a> with TDM400P analogue line cards in a PC to connect to the PSTN and normal telephone extensions.\u00a0 That setup served me well for ages, but I began to have difficulties with the Digium TDM400P cards when driving the lines to the exchange.\u00a0 One of the channels started to play up, and as the DAHDI drivers are not really user-friendly either, I migrated to a pair of Linksys SPA3102 boxes.\u00a0 These are sweet devices which have a lot more functionality in them than I use in my setup.\u00a0 The SPA3102 provides an exchange line (PSTN) interface socket and also a traditional analogue phone interface socket, as well as two Ethernet interfaces, one intended to connect to the Internet (or in this case, to my Asterisk server) and one which I do not use, intended to serve a PC or home\/office network.<\/p>\n<p>Things in the Asterisk world have moved on in three years, and one change is that Trixbox is no longer supported.\u00a0 Feeling that the time was right for an upgrade, I looked around the web and concluded that the front runner these days is <a href=\"http:\/\/pbxinaflash.com\/\">PBX in a Flash<\/a>.\u00a0 This is very similar in scope to Trixbox, being a complete distribution presented as a bootable DVD which takes over and overwrites the entire machine it is booted on.\u00a0 Beware!\u00a0 For my upgrade, I disconnected the existing disk drive and used a different one for the new installation.\u00a0 In typical calavier fashion, I didn&#8217;t write much down about my existing configuration and just went ahead and installed the new one.\u00a0 I used PBX-in-a-Flash (PIAF) v2.0.6.2.4 which includes CentOS 6.2, and I used the 64-bit version.\u00a0 PIAF requires the user to make quite a lot of choices during installation, and I chose FreePBX 2.9 and Asterisk 1.8, these being the most recent stable versions.<\/p>\n<p>Installation takes forever,\u00a0 belying its name.\u00a0 The massive distribution doesn&#8217;t even include half the stuff you need, instead relying on the Internet to download and automatically install additional components.\u00a0 There are several guides to installation on the Web, so I shan&#8217;t attempt one here.\u00a0 What I do want to cover though is the mysteries of getting the TDM400P cards to be recognised.<\/p>\n<p>The best guide to this which I found is <a href=\"http:\/\/www.cadvision.com\/blanchas\/Asterisk\/TestingDahdiHW.html\">Configuring and Testing Dahdi Hardware<\/a>.\u00a0 This covered the basics for me, though I had to recompile and reinstall the DAHDI drivers first:<\/p>\n<p># cd \/usr\/src\/dahdi\/<br \/>\n# make all<br \/>\n# make install<br \/>\n# make config<\/p>\n<p># cd tools<br \/>\n# make distclean<br \/>\n# .\/configure<br \/>\n# make install<\/p>\n<p>Then reboot the machine.<\/p>\n<p>The undocumented magic for me was:<\/p>\n<p># dahdi_genconfig<br \/>\n# cd \/etc\/asterisk<\/p>\n<p>Edit chan_dahdi.conf and add this line near the end, before chan_dahdi_additional.conf:<\/p>\n<p>#include dahdi-channels.conf<\/p>\n<p>After that, it&#8217;s time to reboot again and confirm that the channels exist:<\/p>\n<p># dahdi_cfg -vv<\/p>\n<p>This should list lots of channels on the cards you are configuring.\u00a0 They should also be visible in the Asterisk command-line interface (this output is specific to my setup):<\/p>\n<p>piaf*CLI&gt; dahdi show channels<br \/>\nChan Extension\u00a0 Context\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Language\u00a0\u00a0 MOH Interpret\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Blocked\u00a0\u00a0\u00a0 State<br \/>\npseudo\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-internal\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-internal\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-pstn\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-pstn\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n5\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-internal\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-internal\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-internal\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\n8\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 from-internal\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 In Service<br \/>\npiaf*CLI&gt;<\/p>\n<p>One more magic step: use a browser to access the FreePBX administration interface on your server, and go to the Setup-&gt;DAHDi screen.\u00a0 Under Analogue Hardware, find a line entitled &#8220;FXS Ports&#8221; and hit the &#8220;Edit&#8221; link.\u00a0 If the Group entries are blank for your channels, enter &#8220;1&#8221; in each group field, then save and apply the settings.\u00a0 At that point you should be able to create DAHDI extensions.\u00a0 Hoorah!<\/p>\n<p>The UK-specific changes I documented in my first article on this subject probably still apply, but I haven&#8217;t tried them as I no longer use the FXO ports.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Three years ago, I wrote about making Trixbox work in the UK with TDM400P analogue line cards in a PC to connect to the PSTN and normal telephone extensions.\u00a0 That setup served me well for ages, but I began to have difficulties with the Digium TDM400P cards when driving the lines to the exchange.\u00a0 One [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-174","post","type-post","status-publish","format-standard","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":2,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"predecessor-version":[{"id":179,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/posts\/174\/revisions\/179"}],"wp:attachment":[{"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lemongrass.org.uk\/lemongrass\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}