This discussion is locked
lisfolks

Q: How do modems interact with efax and ccl scripts to receive calls in 10.5?

I want to do two things:
1) alter the modem init string used for faxing and receiving calls, and
2) alter the RING string to detect and respond to other modem responses during the answer process

The machine in question is a PowerBook G4 with an Apple Internal Modem (V.92) running Leopard 10.5.1.

In searching, it seems that Leoard is using efax as its base fax app. I have located the efax plist in the LaunchDaemons folder. It sends the 'answer' command via the 'fax' app to the 'efax' app. This command is an argument key in the plist.

Now, how do I change the modem init string that is used for the purpose of faxing? Also, how do the modem CCL files interact with this whole process - or do they?

Thanks in advance for any help you can offer. I'm either just googling for the wrong things or there aren't many people looking for this information? Most likely the former...

MacBook Pro 15", 2.16 GHz Intel Core Duo, Mac OS X (10.5.1)

Posted on Jan 27, 2008 2:50 PM

Close

Q: How do modems interact with efax and ccl scripts to receive calls in 10.5?

  • All replies
  • Helpful answers

  • by lisfolks,

    lisfolks lisfolks Feb 1, 2008 7:53 PM in response to lisfolks
    Level 1 (77 points)
    Apple Music
    Feb 1, 2008 7:53 PM in response to lisfolks
    Well, it appears that CCL scripts are used via the Internet Connect functionality, and the fax and efax apps run in the background for faxing capability.

    I can find all kinds of documentation on CCL scripts, but none tells how they are invoked - just that they are. I've noticed that the Connect button in Network preferences in System Preferences is using the CCL script via the selected Vendor and Model listed under Advanced. That's fine and dandy for calling out. How is it invoked for calls coming in, though? CCL scripts have got an @ANSWER path to code for, but how does it get to that???
  • by lisfolks,

    lisfolks lisfolks Feb 17, 2008 5:35 PM in response to lisfolks
    Level 1 (77 points)
    Apple Music
    Feb 17, 2008 5:35 PM in response to lisfolks
    Well, I'm starting to feel like I've got a little blog going on here, since I'm only answering myself - but for anyone else who may someday seek this information, here is a little more:

    In Leopard, when you set up the fax in System Preferences/Printers and Fax, it enables an efax plist used by an application called 'launchd'. When your computer boots up, if that plist is indicated as enabled (using a key within the plist), launchd starts up the 'fax' script with parameters matching what is entered in the fax setup in System Preferences. This script starts up the 'efax' application, which runs continuously in the background, waiting for a call to come in.

    The plists involved are:
    Library\Preferences\com.apple.print.FaxPrefs.plist -- which contains the actual fax preferences, like phone number and number of rings for example, that are ultimately provided to efax.
    System\Library\LaunchDaemons\com.apple.efax.plist -- which is the one used by launchd to start the fax script, and which contains the arguments and path to that script.

    efax does not use the CCL scripts; instead, those seem to be used by the Internet Connection modem selection, as I mentioned previously.

    efax runs in the background constantly. If it were to crash for some reason, launchd would automatically start it up again - unless the fax functionality is turned off in System Preferences, in which case the efax application would be 'turned off', and would no longer run in the background.

    There is a 'lock' feature in efax, which is supposed to temporarily suspend efax while other apps use the modem. So, my next question is whether I can somehow leave the Internet Connect functionality running, exiting when I get the result I want, which would then allow efax to come on up and answer the phone.

    Alright, I'm going to admit it - I'm trying to find a way to make Distinctive Ring work with efax. The PowerBook G4 internal modem can sense Distinctive Ring with a +VDR=n,n value added to the initialization string. Once this is added to the init string, the modem will return the amount of time the ringer is on or off, with values like DRON=8 and DROF=40, as well as the normal RING. Using a CCL script, I can look for those values coming in from the modem instead of the usual RING value. (As far as I can tell, I cannot do this with efax directly without changing the actual source code. The RING value it looks for is hard-coded.) So, the question becomes how to transfer control from the Internet Connect to efax, and can I do so soon enough for it to be able to answer the phone before my AT&T CallNotes does?

    More to come (if someone else doesn't answer my question before I do
  • by Andrew Vit,Helpful

    Andrew Vit Andrew Vit Feb 20, 2008 11:35 PM in response to lisfolks
    Level 1 (115 points)
    Feb 20, 2008 11:35 PM in response to lisfolks
    Hello, I got distinctive ring in Leopard to work for me today, hope this helps:

    http://discussions.apple.com/message.jspa?messageID=6655827#6657880

    I have no idea how fax interacts with internet connect, since I have the internal modem disabled in my Network preferences. If you have it turned on, I don't believe it should lock out the fax as long as you're not connected, but I might be wrong... I'd be curious to know how that works too.

    Cheers.
  • by lisfolks,

    lisfolks lisfolks Mar 2, 2008 9:56 AM in response to Andrew Vit
    Level 1 (77 points)
    Apple Music
    Mar 2, 2008 9:56 AM in response to Andrew Vit
    Thanks very much for the tip, Andrew! It didn't, however, work in my case. I think it has to do with the RING value...

    First, here's what I did: there is an existing VOICEINIT variable in the 'fax' script, into which '-j' commands can be placed. I used this, which basically did the same thing as the DISTINCTRING value you set up in your 'fax' script. I edited the '/etc/efax.rc' file (which, by the way, contains the calls to the FaxPrefs.plist file for the System Preferences Print settings we set), and added VOICEINIT='-j+VDR=1,5' at the bottom. I saved the file, then changed the number of rings for answer in the Print System Preferences, so it would restart the 'efax' app.

    I then ran 'sudo ps -f -w > psfile' to get a listing of what was running (which includes the command line for the 'efax' app, but is too wide to read in Terminal). I then 'cat'd the file 'psfile' to see the full 'efax' command line (which wraps with 'cat'). The new VOICEINIT value showed on the 'efax' command line, so should've worked, theoretically - but it didn't.

    You had noted in your solution at the above link that the '-SDR=2' produces a RING pattern that instead shows RING2. My '+VDR=1,5' addition still produces the normal RING pattern, but adds the DRON/DROF values as well. I believe that 'efax' can recognize the RING2 result in your case, but it has no clue what to do with the DRON/DROF that my modem produces and just ignores it.

    I'm still experimenting with this, though, as when I set my command, the modem didn't answer at all - and, it seems to me that it should've answered due to the normal RING it found, as it does without the command being present. So, maybe I err'd somewhere...

    Thanks for responding to my "blog"!
  • by lisfolks,

    lisfolks lisfolks Apr 5, 2009 4:11 AM in response to lisfolks
    Level 1 (77 points)
    Apple Music
    Apr 5, 2009 4:11 AM in response to lisfolks
    I never figured this out, but no longer have my PowerBook, so no longer need the information. I'm marking the question as 'answered' in order to close it out.