• Subscribe to this RSS Feed
  • Slow DNS Lookups in Ubuntu 9.10 (Karmic Koala)
    01/28/2010 11:28PM

    One of the most frustrating things about Ubuntu/Kubuntu 9.10 (and 9.04) is the random but frequent 20 sec DNS lookup delay that happens when IPV6 is enabled. Apparently, the resolver first attempts an IPV6 lookup, even if no interfaces are defined. It will sit and time out, at random, for 20 seconds before attempting the IPV4 lookup.

    There are a number of proposed fixes. One is to turn of IPV6 in firefox. This seems to work for a while, but then fails.

    Here's a link to article about turning off IPV6 in Ubuntu:

    http://www.ubuntugeek.com/how-to-disable-ipv6-in-ubuntu.html

    In grub, to turn off IPV6 edit /etc/default/grub and change

     

    GRUB_CMDLINE_LINUX_DEFAULT=quiet splash

    to

    GRUB_CMDLINE_LINUX_DEFAULT=ipv6.disable=1 quiet splash

     run

    update-grub

    and reboot.

    It's not clear to me yet whether this actually works around the problem or not. Initially on reboot, opening 20 some tabs in firefox seemed much quicker than before but I did get a long hang once I brought up thunderbird. So it may not be a fix after all. Only time will tell.

    To turn off IPV6 in firefox (which doesn't seem to work around the issue but is probably good to know):

     

    Enter about:config in the URL bar then and search for:

    network.dns.disableIPv6

    and set it to true.

    Here's a link to a very long bug report discussion on the subject:

    https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/417757?comments=all

    2010-02-03 Update:

    Even with all these changes, I was continuing to get DNS timeouts until I came upon this bug in launchpad (which of course I found /after/ commenting on the bug above, figures:

    https://bugs.launchpad.net/ubuntu/+source/nss-mdns/+bug/94940

    Editing /etc/nsswitch.conf and changing

       hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

    to

       hosts: files dns

     seems to /finally/ get the DNS lookup performance I would expect.

  • Technorati
    11/27/2009 8:09PM
    Submitted this blog to technorati.
    F82AAZKE9KWM
  • YML.COM Upgraded for formVista 0.8.9.2
    11/07/2009 3:36PM

    I've upgraded the formVista install to the latest and greatest version. This version upgrades jQuery to 1.3.2 and also includes the "Share" links on blog articles making it easier to cross post things to other sites. This version also fixes yet another long standing login bug. So if you have any problems logging in please let me know.

  • End of the World is clearly 2038, not 2012
    10/17/2009 3:28PM

    There's alot of talk about 2012 and the end of the world. This is all clearly false. The end of the world will be on Mon Jan 18, 2038 at 22:14:07. Mark your calendars.

    #include <stdio.h>
    #include <time.h>
    #include <limits.h>
    
    int main(void)
            {
            time_t end_of_time;
    
            end_of_time = INT_MAX;
    
            printf("End of the world will be: %s\n",
                    asctime(localtime(&end_of_time)), end_of_time );
    
            return(0);
    
            }
    

    End of the world will be: Mon Jan 18 22:14:07 2038

  • 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.