Ben Sturmfels

Dialing phone numbers from Emacs

Ben Sturmfels at

Wrote a little Emacs function to dial a phone number from my BBDB address book using my desktop Jitsi client. So now I run C-c b [search term] then M-d to dial. Really handy.

(defun jitsi-dial (phone)
  "Call a phone number PHONE using Jitsi."
  (interactive (list (bbdb-current-field) current-prefix-arg))
  (let ((phone-uri
         (format "sip://%s@sip.internode.on.net"
                 (replace-regexp-in-string " " "" phone))))
    (call-process "jitsi" nil nil nil phone-uri)))

(setq bbdb-dial-function 'jitsi-dial)

I've hard-coded my SIP gateway provider and preferred SIP client instead of configuring my OS to appropriately handle sip:// URLs. But that's how all good Emacs hacks should be. ;)

clacke@libranet.de ❌, Adam Bolte, Christopher Allan Webber likes this.

clacke@libranet.de ❌, clacke@libranet.de ❌, clacke@libranet.de ❌, clacke@libranet.de ❌ and 1 others shared this.

@John Sullivan had his openmoko set up so he could call from emacs back in the day :)

Christopher Allan Webber at 2017-05-05T02:22:06Z

Awesome! Was it Emacs running on the phone, or from a remote Emacs?

Ben Sturmfels at 2017-05-05T02:25:34Z

Emacs was running on the phone! It was talking to the phone daemon over dbus.

Christopher Allan Webber at 2017-05-05T02:30:11Z

clacke@libranet.de ❌ likes this.

Nice! I need to find something cool to do with my old OpenMoko. Maybe a digital clock for my new office...

Ben Sturmfels at 2017-05-05T02:35:30Z

der.hans, Christopher Allan Webber likes this.