If you are looking for the epic motorcycle journey blog that I've written, please see the Miles By Motorcycle site I put together. 
  • Misc Points on Installing TrixBox 2.8.0.1 (Asterisk)
    10/12/2009 1:53AM

    Getting Trixbox 2.8.0.1 up and running has proven to be problematic.

    Here's a link to the developers blog. Doing a yum update without doing a yum clean all followed by removing the kmod-dahdi-linux and dahdi-linux packages (see linked article) will produce dependency conflicts and prevent the update from finishing.

    Further confounding things I ran into this error during the update:

    Transaction Check Error:
      file /lib/modules/2.6.18-128.1.10.el5/extra/avmfritz.ko from install of kmod-mISDN-1.1.7.2-2_centos5.2.6.18_128.1.10.el5.i386 conflicts with file from package kmod-mISDN-1.1.7.2-1_centos5.2.6.18_128.1.10.el5.i686

    Searching online I came across this post that suggests doing:

    rpm -e --nodeps kmod-mISDN
    yum update

    which seems to work.

    Update 2009-10-12

    After doing all the updates and going through the handstands of setting up incoming routes, recording some messages, creating an IVR along with some mailboxes, I had it working like a champ on one incoming line with one extension.

    Something to note, when you record greetings from an extension, for some reason it's not including the extensions number in the generated file in the /tmp directory. So you have to manually prepend the extension number onto the file before naming it and clicking submit in the web GUI. (otherwise you get a no such file error).

    I also noticed when using the handset to record messages, if you press the keypad prompts too quickly, asterix gets confused and doesn't recognize the number. It seems to do the same thing when going through the IVR. This could be a problem for users.

    So I was trying to get the second line, the fax line working, when I ran into a the dreaded chan_dahdi.c: Detected alarm on channel tdm400 error. The line rings, then I get the error in the asterix log file (/var/log/asterix/full). After doing some searching around online, I was unable to find anything that seemed directly relevant.

    So I figured I'd try to setup the PSTN modules by running setup-pstn. Big mistake. Now for some reason both TDM400P ports are unrecognized and I'm back to getting the No such command 'dahdi show channels' error. Some configuration file or another got screwed up.

    So instead of spending my life trying to track down exactly which driver isn't getting loaded and what the correct configuration changes are, I'm just doing a reinstall. Back to square 1.

    Reinstall:

    1. Install fresh copy of TrixBox 2.8.0.1 from ISO
    2. the install will hang at some points for what seems like a very long time.
    3. log in and set network and dns config using system-config-network
    4. reboot
    5. DNS settings get lost. Re-run system-network-config
    6. yum clean all
    7. to avoid nasty dependency problems: rpm -e --nodeps kmod-dahdi-linux
    8. rpm -e --nodeps kmod-mISDN
    9. yum -y update
    10. reboot for good measure

    at this point the system should be functional. I have noticed that the default postfix install does not work. There's some setting somewhere that's causing it to send mail from trixbox.localdomain instead of the domain I set. Using the trixbox supplied "install-sendmail" script (see help-trixbox) postfix can be removed and a civilized sendmail install created. You have to manually run sendmail after the install using /etc/rc.d/init.d/sendmail start. Also make sure to enable sendmail to run on reboot using chkconfig sendmail on.

    At this point to configure a working simple PBX with a simple voicemail system with a couple of voice mailboxes:

    1. load the Web GUI
    2. click on the "switch" account link in the upper right hand corner.
    3. in my case I have a TDM400P card with 1 local port and 2 PSTN ports. You'll want to make sure that TrixBox is seeing the ports correctly. Go to the PBX -> PBX Status menu item. In the middle of the report you should see something like:
      Dahdi driver info
         Chan Extension  Context         Language   MOH Interpret        Blocked    State       pseudo            default         en         default                         In Service       1            from-internal   en         default                         In Service       2            from-pstn       en         default                         In Service       3            from-pstn       en         default                         In Service 
    4. In my case, I have a physical phone connected to channel 1 (port 0). To set up a physical extension to go PBX->PBX Settings and select the Extensions menu on the left (top of the menu under Basic)
    5. Select ZAP as the extensions type then select an extension number (in my case 601), a display name (Yermo Lamers), channel (in my case 0). If you want voicemail enables and your voicemails emailed to you as .wav files, select enable voicemail and enter and email address for the voicemails to be delivered to.
    6. For the IVR, you'll want a company level drop voicemail box. I created a second virtual SIP extension. I enabled voicemail for it and have the voicemails emailed to an address that gets forwarded to both Anatoly and I.
    7. Now that you have an extension, you can record some greetings. Go to the System Recordings menu item on the left (near the very bottom). You have the choice of enabling a wide range of default system recordings or recording your own. Personally I like the "Abandon all Hope Ye Who Enter Here" one, but I don't think it'll work too well for our purposes.
    8. You can record greetings through your connected extension. Simply enter the number of extension in the first box and click GO. Now pick up the handset for that extension and press *77. You'll hear a single beep. Speak your greeting clearly. Press # when finished. TrixBox/Asterix will speak at you. I've noticed that if you press 1 to hear your recording too quickly or press * too quickly to rerecord it trixbox gets confused and hangs up.
    9. Once you're happy with your recording you have to rename the file. There seems to be a bug whereby the file is not correctly named. It should include the extension number but does not. cd to /tmp and you should see a file called -ivrrecording.wav. Rename that file to include the extension number. In my case it's 601-ivrrecording.wav (to move the file with the embedded - use mv -- -ivrrecording.wav 601-ivrrecording.wav)
    10. Now you can enter a name for this recording in the WEB Gui and click save.
    11. At this point, you can create a simple IVR. In my case a caller may either go straight to my own mailbox or leave a message in the billing mailbox after pressing 1.
    12. Go to IVR on the left menu.
    13. Click ADD IVR
    14. Give your IVR a name and select the greeting you recorded above. There are a bunch of options here. In the bottom section, you can enter what actions the caller may do. It's not clear in the dialog but the little boxes on the left under Return to IVR are actually the number the user should enter to select the option.
    15. In my case I want the caller to press 1 to get to the billing dropbox extension 100 to leave a voicemail.
    16. Enter 1 in the little box, check extensions and select the voicemailbox you'd like the user sent to. In my case it's 100.
    17. Now create an "inbound route" which will tie incoming calls to the IVR. Select Inbound Routes from the left menu.
    18. For my setup here, all I need is to select the IVR option at the bottom and indicate my newly created IVR should answer the phone. No other fields need to be filled in. This will create a default inbound route called any DID / any CID.
    19. Now that everything is set up click on the orange Apply Configuration Changes button in the top middle of the display. Without this nothing will work as it reloads Asterix with all of your configuration changes.
    20. You can now dial your number from an outside line and leave yourself a voicemail.

    I have noticed that the voice prompts are quite slow to respond, but they do seem to work.

    At this point I'm back to where I started. Voicemail works on the first line but there's some problem on the second line which may be hardware related. The card seems to detect the rings but won't pick up. I see this in the /var/log/asterix/full log:

    [Oct 13 01:49:45] WARNING[3213] chan_dahdi.c: CallerID feed failed: Success                                                                                                        
    [Oct 13 01:49:45] WARNING[3213] chan_dahdi.c: CallerID returned with error on channel 'DAHDI/2-1'                                                                                  
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@from-pstn:1] Set("DAHDI/2-1", "__FROM_DID=s") in new stack                                                           
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@from-pstn:2] Gosub("DAHDI/2-1", "app-blacklist-check,s,1") in new stack                                              
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@app-blacklist-check:1] GotoIf("DAHDI/2-1", "0?blacklisted") in new stack                                             
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@app-blacklist-check:2] Return("DAHDI/2-1", "") in new stack                                                          
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@from-pstn:3] ExecIf("DAHDI/2-1", "1 ?Set(CALLERID(name)=)") in new stack                                             
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@from-pstn:4] Set("DAHDI/2-1", "__CALLINGPRES_SV=allowed_not_screened") in new stack                                  
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@from-pstn:5] Set("DAHDI/2-1", "CALLERPRES()=allowed_not_screened") in new stack                                      
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@from-pstn:6] Goto("DAHDI/2-1", "ivr-2,s,1") in new stack                                                             
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Goto (ivr-2,s,1)                                                                                                                  
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:1] Set("DAHDI/2-1", "MSG=custom/DTLink_greeting") in new stack                                                 
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:2] Set("DAHDI/2-1", "LOOPCOUNT=0") in new stack                                                                
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:3] Set("DAHDI/2-1", "__DIR-CONTEXT=default") in new stack                                                      
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:4] Set("DAHDI/2-1", "_IVR_CONTEXT_ivr-2=") in new stack                                                        
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:5] Set("DAHDI/2-1", "_IVR_CONTEXT=ivr-2") in new stack                                                         
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:6] GotoIf("DAHDI/2-1", "0?begin") in new stack                                                                 
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:7] Answer("DAHDI/2-1", "") in new stack                                                                        
    [Oct 13 01:49:45] VERBOSE[3213] logger.c:     -- Executing [s@ivr-2:8] Wait("DAHDI/2-1", "1") in new stack                                                                         
    [Oct 13 01:49:46] WARNING[3213] chan_dahdi.c: Ring/Off-hook in strange state 6 on channel 2                                                                                        
    [Oct 13 01:49:46] WARNING[3213] chan_dahdi.c: Detected alarm on channel 2: Red Alarm
    [Oct 13 01:49:46] VERBOSE[3213] logger.c:   == Spawn extension (ivr-2, s, 8) exited non-zero on 'DAHDI/2-1'
    [Oct 13 01:49:46] VERBOSE[3213] logger.c:     -- Executing [h@ivr-2:1] Hangup("DAHDI/2-1", "") in new stack
    [Oct 13 01:49:46] VERBOSE[3213] logger.c:   == Spawn extension (ivr-2, h, 1) exited non-zero on 'DAHDI/2-1'
    [Oct 13 01:49:46] VERBOSE[3213] logger.c:     -- Hungup 'DAHDI/2-1'
    [Oct 13 01:49:51] NOTICE[2533] chan_dahdi.c: Alarm cleared on channel 2

    To come up to speed on TrixBox I did end up buying this book which did offer some answers to problems I had run into. It's by no means a definitive tome but does provide a reasonable introduction to the system.

    trixbox_ce_2.6.jpgir?t=personaltoolscom&l=as2&o=1&a=1847192998

     I don't yet have anonymous comments built into formvista, the software powering YML.COM. But if you have any questions, feel free to contact me. I'm an asterix novice but will be happy to share what little I know. At soime point before too terribly long I hope to open up registrations to YML.COM to the general public. I just need to put more things in the place before I'm ready to do that.

  • Comment By:
    -unknown
    10/12/2009 12:50PM
    It's probably safe to remove all modules and applications specific to ISDN unless you are obligated to legacy equipment. Thankfully, ISDN is going away the same as X.25.
  • Comment By:
    Yermo
    10/12/2009 1:56PM
    Yea, I did try that, unfortunately the ISDN modules are dependencies for other modules and it started cascading out. So I punted. It seems to have upgraded ok, but I haven't yet had a chance to try the install.
You must be logged into an account to post comments.