Re: BBDB and twinkle

Frank Dordowsky <[email protected]> Mon, 25 Oct 2021 22:08:39 +0200
Newsgroups gmane.emacs.bbdb.user
Message-ID <[email protected]>
Thanks for the example. I will try to adapt it to twinkle.
Frank

Bernd Wachter <[email protected]> writes:

> Frank Dordowsky <[email protected]> writes:
>
>> I understand that it is possible to dial a number noted in BBDB by
>> pressing M-d. I use twinkle as a SIP phone and I have set the variable
>> bbdb-modem-dial to the string "twinkle --immediate --hide --call" which
>> works when using it in a console. However, when pressing M-d, BBDB opens
>> a web page in a browser. Do I need setting some other variables? Is
>> there a description or example on how to use BBDB with a softphone?
>
> Set bbdb-dial-function. I have a configuration which dials through
> asterisk from my desktop, or through the Android API when running on my
> phone:
>
> (if running-in-termux
>     (setq bbdb-dial-function 'aard-dial-termux-telephony)
>   (setq bbdb-dial-function 'aard-dial-ami))
>
> (defun aard-dial-termux-telephony (phone-number)
>   "Dial a phone number through termux-telephony-call script"
>   (start-process
>    "termux-telephony-call"
>    (get-buffer-create "*termux-dial*")
>    "termux-telephony-call"
>    phone-number))
>
> (defun aard-dial-ami (phone-number)
>   "Dial a phone number through AMI script"
>   (let ((records (bbdb-search (bbdb-records) nil nil nil nil phone-number)))
>     (start-process
>      "ami-dial"
>      (get-buffer-create "*ami-dial*")
>      "ami-dial"
>      (concat "--number=" phone-number)
>      (if records
>          (concat "--message=To: " (bbdb-record-name (car records)))
>        ("--message=Name not found"))
>      )))
>
>
> Bernd


-- 
Frank Dordowsky
Säntisstr. 37
81825 München


_______________________________________________
[email protected]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/