bbdb-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BBDB autodialing


From: Bob Newell
Subject: BBDB autodialing
Date: Wed, 04 Apr 2018 07:45:45 -1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25 (gnu/linux)

Aloha,

My main working environments are laptops/desktop with Linux
Mint and an Android tablet largely using Termux. I wanted
automated BBDB calling (bbdb-dial) on these devices. The
tablet doesn't have cell, only wi-fi. I believe Apple users
already have BBDB calling and we can't fall behind them :)

Roland very kindly straightened out a misconception I had
(thank you!) and I'm now "sort of" successful with this.

If you have a Google account and you're always signed in, it's
easy enough on the tablet to route calls through Google
Hangouts. On the Linux systems, it's more complex. Here's some
elisp. On Termux, the Termux-API must be installed (see Termux docs).

-------
;;; Linux or Termux?
(defvar termuxing)
(if (string= (getenv "HOME")
     "/data/data/com.termux/files/home")
    (setq termuxing t)
    (setq termuxing nil)
  )

;;; Sort-of dialer for chrome. Only gets you part way there.
(defun chrome-dial-number (number)
  "Dial a number, almost completely"
  ;; Change path to suit your environment
    (start-process "bbdb call" "*BBDB Call Buffer*"
    "/home/bnewell/data/code/chromecall" number)
    )

(defun termux-dial-number (number)
  "Dial a number, mostly"
    (start-process "bbdb call" "*BBDB Call Buffer*"
    "termux-telephony-call" number))

(if (not termuxing)
    (setq bbdb-dial-function 'chrome-dial-number)
    (setq bbdb-dial-function 'termux-dial-number)
)
-----

The Termux call will initially bring up the 'chooser' and you
can 'choose' Hangouts as the permanent option.

For Chrome, you need the 'chromecall' bash script, too long to
post but available here:

http://www.bobnewell.net/filez/chromecall

This script is a super kludge, making use of xclip, xsel, and
xdotool. As such it's fragile and can break if Google Hangouts
changes their layout. Unfortunately Google killed off the
Hangouts API in 2017. Again, you must have a Google account,
and be logged in. I'm pretty sure you also have to have a
Google Voice phone number, but I'm not positive.

I hope this is of some use to someone else. It works for me,
at least. I find it very handy to call from BBDB no matter
where I am when I don't feel like reaching for my cell phone
and looking up a number there. There's just something
appealing about doing everything from the keyboard with Emacs
and BBDB :)

Ideas and especially improvements welcome.

-- 
Bob Newell
Honolulu, Hawai`i
* Via Gnus/BBDB/Org/Emacs/Linux *



reply via email to

[Prev in Thread] Current Thread [Next in Thread]