Menu

No fax when hangup

2014-12-30
2015-01-10
  • baradanikto

    baradanikto - 2014-12-30

    John....I'm taking your advice from our recent email conversation and moving this discussion here. To recap, I have a Raspberry Pi B+ with a Zoom USB model 3095. Originally, I could not get NCID to hang up on any calls. At that time, I was running with version 0.86 as was indicated in this blog post. Since then, I've upgraded to version 1.0. In testing, my calls are now answered and the hang up does occur. However, I've set it to send a fax signal in response. I do not hear anything. The sequence is as follows: The call comes in and rings once; NCID picks up and I hear about a couple seconds of silence; The call is terminated.

    I've currently got hangup set to 2 and I've tried with pickup = 0, but, I don't get a fax tone. The modem documentation states that it can send/receive faxes. I've tried some basic debugging, but, I'm not getting anywhere. I did, however, notice something interesting in the ncidd.log file. There's lots of "Removed client 0, invalid request". Don't know if that's normal. Anyway, I'm looking for any help in getting the fax tone to work with the hangup. Thanks in advance.

     
  • Todd Andrews

    Todd Andrews - 2014-12-30

    Hi baradanikto,

    Did you happen to try with pickup = 1? If you did and that did not make any difference, please stop ncidd and rerun with at least verbose level 3:

    sudo ncidd -Dv3
    

    Do a test of a blacklisted call. Attach the relevant part of the log to this thread as a file, obfuscating any sensitive info.

    It's possible ncidd is deciding it can't do fax answer and is doing a normal hangup instead. The log will tell us.

     

    Last edit: Todd Andrews 2014-12-30
  • Todd Andrews

    Todd Andrews - 2014-12-30

    Edited previous post to do sudo.

     
  • baradanikto

    baradanikto - 2014-12-30

    I've attached the ncidd.log. I've replaced the phone number with "X" in the log.

     

    Last edit: baradanikto 2014-12-30
  • Todd Andrews

    Todd Andrews - 2014-12-30

    Hi baradanikto,

    I've looked at the log. It doesn't look like the hangup option is set to 2 in ncidd.conf.

    # hangup = 2          generate FAX tones, then terminate the call
    # set hangup = 2
    

    To see if this is the issue, stop ncidd and re-run like this:

    sudo ncidd -Dv3 -H2
    

    Do your test of a blacklisted call. If it works, uncomment this line and re-launch ncidd:

    set hangup = 2
    

    I see what you mean about the multiple "Removed client 0, invalid request." There are also all of those "Client 0 pos x Hung Up" lines, too.

    Can you tell me:

    What client you are using to connect to ncidd? For example, NCIDPop? And the version number of the client?

    What is the firmware level of your Raspberry Pi?

    /opt/vc/bin/vcgencmd version
    

    For comparison purposes, my RPi reports:

    Sep  8 2014 19:02:48 
    Copyright (c) 2012 Broadcom
    version 3f2f2607186be72e4945cfa8edc77872dfc73195 (clean) (release)
    
     
  • baradanikto

    baradanikto - 2014-12-30

    I think I've discovered what may be the root of my problem. I've got several locations where the ncidd.conf file was located. And, it appears that I did not completely remove the prior version (0.86) that I was initially playing with because the date comments in some of the files do not match. At this point, I'm tempted to just reload everything. Is that appropriate, or, is there a better way to remove the prior code and re-install with version 1.0?

     
  • Todd Andrews

    Todd Andrews - 2014-12-31

    Hi baradanikto,

    Having a mix of old and new source code at the time of compiling, or even leftover executable binaries, could definitely cause problems. I hesitate to have you just reload everything without first removing all the old stuff. In particular, we need to be sure there are no lingering scripts attempting to launch parts of NCID at boot time.

    To get started, I suggest executing the following and attaching the result /tmp/gort.txt to this thread.

    sudo find /  -name "ncid*" > /tmp/gort.txt
    

    This will give a list of path names. It will not contain any sensitive data that you need to worry about obfuscating.

    Typically the files ncidd.conf, ncidd.blacklist, ncidd.alias and ncidd.whitelist are the most often customized. You'll want to copy them to a safe place before we wipe everything out.

    You'll also want to take into account if you have tweaked any other .conf files, especially for modules and gateways. Save those to a safe place, too.

     
  • baradanikto

    baradanikto - 2015-01-01

    Todd...attached is the requested file. Nice touch with the name, by the way...

     
  • Todd Andrews

    Todd Andrews - 2015-01-01

    Hi baradanikto,

    I've looked at the file and it's not too bad. I'll work up a cleanup strategy and get back to you, probably later today.

     
  • Todd Andrews

    Todd Andrews - 2015-01-02

    Hi baradanikto,

    Here are the steps I've come up with to remove the extraneous files from the two possibly-mixed versions of NCID, and reset things by re-compiling NCID 1.0:

    sudo invoke-rc.d ncidd stop
    cd /
    sudo mv -i /usr/local/etc/ncid /ncid-delete-someday
    sudo rm -fr /home/Documents/source/ncid
    cd /home/Documents/source/
    tar xzvf ncid-1.0-src.tar.gz
    cd ncid
    make ubuntu
    sudo make ubuntu-install
    

    Directory /ncid-delete-someday will contain the extra ncidd-related config files (ncidd.conf, ncidd.blacklist, ncidd.whitelist, ncidd.alias, etc.) that were causing confusion. You may wish to examine these to see if you've modified them.

    You probably already know that you won't need to make the code changes from the original blog post since you'll be using NCID 1.0 that already has fax-hangup capability.

    The way the NCID compile works is if the various config files already exists they will be left alone and instead a new version with the extension .new will be created that has the normal compile-time defaults.

    This means your existing ncidd.conf, ncidd.blacklist, ncidd.whitelist, ncidd.alias, etc. files will not be touched. You should, however, check the following to make sure they have what you expect to test the fax hangup:

    • ncidd.blacklist -- your test phone#
    • ncidd.conf -- make sure set hangup = 2 is not commented out

    For now, I would leave the set pickup line in ncidd.conf as-is. If the fax tones aren't heard, switch set pickup, restart ncidd and test again.

    Let us know how it goes. I'm particularly interested in knowing if you still see the multiple "Removed client 0, invalid request." and "Client 0 pos x Hung Up" lines.

     
  • baradanikto

    baradanikto - 2015-01-02

    Success!

    I followed your clean up strategy to a "T" and it all works now! I had some minor issues that the log file pointed out, but, I'm now getting the fax tone and the hangup as expected. Todd, thank you very much for taking the time to help out.

     
  • Todd Andrews

    Todd Andrews - 2015-01-09

    Hi baradanikto,

    You're very welcome. Glad I could help.

    I'd be interested in knowing what ncidd.conf pickup setting is working for you on the Zoom USB model 3095? I'm thinking of contacting the author of the original blog post you found.

     
  • baradanikto

    baradanikto - 2015-01-10

    Todd...I don't explicitly set 'pickup', so, I'm using the default.

     

Log in to post a comment.