* sip: links
@ 2015-06-20 15:23 Christian Thaeter
2015-06-21 0:39 ` Christian Thaeter
2015-06-21 10:37 ` Michael Strey
0 siblings, 2 replies; 8+ messages in thread
From: Christian Thaeter @ 2015-06-20 15:23 UTC (permalink / raw)
To: org-mode
anyone of you happen to have a url handler for 'sip:' links invoking a
telephony app (eg. linphone) when clicked? Otherwise I may give a
try on my own nonexistent elisp skills :D
Christian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sip: links
2015-06-20 15:23 sip: links Christian Thaeter
@ 2015-06-21 0:39 ` Christian Thaeter
2015-06-21 10:37 ` Michael Strey
1 sibling, 0 replies; 8+ messages in thread
From: Christian Thaeter @ 2015-06-21 0:39 UTC (permalink / raw)
To: emacs-orgmode
On 2015-06-20 17:23, Christian Thaeter wrote:
> anyone of you happen to have a url handler for 'sip:' links invoking a
> telephony app (eg. linphone) when clicked? Otherwise I may give a
> try on my own nonexistent elisp skills :D
>
> Christian
>
Note to self: The code below works for me, maybe someone finds it useful
or wants to improve it.
Cheers
Christian
--------------------8<---------------------------------------
;;; org-sip.el - Support for telepone calls using sip links
(require 'org)
(org-add-link-type "sip" 'org-sip-open)
(defcustom org-sip-command "linphone -c"
"The Emacs command to be used to make a telephone call."
:group 'org-link
:type '(string))
(defun org-sip-open (destination)
"make a call to DESTINATION"
(start-process-shell-command "sip" nil
(concat org-sip-command
" "
(shell-quote-argument
destination))))
(provide 'org-sip)
;;; org-sip.el ends here
-------------------->8-------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sip: links
2015-06-20 15:23 sip: links Christian Thaeter
2015-06-21 0:39 ` Christian Thaeter
@ 2015-06-21 10:37 ` Michael Strey
2015-06-21 16:15 ` Christian Thaeter
1 sibling, 1 reply; 8+ messages in thread
From: Michael Strey @ 2015-06-21 10:37 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
Hi Christian,
On Sa, 2015-06-20, Christian Thaeter wrote:
> anyone of you happen to have a url handler for 'sip:' links invoking a
> telephony app (eg. linphone) when clicked?
The attached org-dial.el provides support for a link type `tel:' as well
as for dialing from properties in org-contacts.
Enjoy.
--
Michael Strey
http://www.strey.biz * https://twitter.com/michaelstrey
[-- Attachment #2: org-dial.el --]
[-- Type: application/emacs-lisp, Size: 3620 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sip: links
2015-06-21 10:37 ` Michael Strey
@ 2015-06-21 16:15 ` Christian Thaeter
2015-06-22 9:27 ` Michael Strey
0 siblings, 1 reply; 8+ messages in thread
From: Christian Thaeter @ 2015-06-21 16:15 UTC (permalink / raw)
To: emacs-orgmode
On 2015-06-21 12:37, Michael Strey wrote:
> Hi Christian,
>
> On Sa, 2015-06-20, Christian Thaeter wrote:
>
> > anyone of you happen to have a url handler for 'sip:' links
> > invoking a telephony app (eg. linphone) when clicked?
>
> The attached org-dial.el provides support for a link type `tel:' as
> well as for dialing from properties in org-contacts.
>
> Enjoy.
looks good, I'll use that instead of my hack. I've a minor ideas to add:
Instead just append the telephone number to the end of the
dial command one could use (org-replace-escapes STRING TABLE), that
allows little more flexible commandline generation.
Thanks
Christian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sip: links
2015-06-21 16:15 ` Christian Thaeter
@ 2015-06-22 9:27 ` Michael Strey
2015-06-22 15:02 ` Christian Thaeter
0 siblings, 1 reply; 8+ messages in thread
From: Michael Strey @ 2015-06-22 9:27 UTC (permalink / raw)
To: emacs-orgmode
On So, 2015-06-21, Christian Thaeter wrote:
[...]
> looks good, I'll use that instead of my hack.
Look out for bugs. It's one of my very first emacs-lisp hacks.
> I've a minor ideas to add:
>
> Instead just append the telephone number to the end of the
> dial command one could use (org-replace-escapes STRING TABLE), that
> allows little more flexible commandline generation.
Thanks for the hint. Could you please give me an example where this
increased flexibility would be required?
Best regards
--
Michael Strey
http://www.strey.biz * https://twitter.com/michaelstrey
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sip: links
2015-06-22 9:27 ` Michael Strey
@ 2015-06-22 15:02 ` Christian Thaeter
2015-06-23 4:24 ` briangpowell .
0 siblings, 1 reply; 8+ messages in thread
From: Christian Thaeter @ 2015-06-22 15:02 UTC (permalink / raw)
To: emacs-orgmode
On 2015-06-22 11:27, Michael Strey wrote:
> On So, 2015-06-21, Christian Thaeter wrote:
>
> [...]
>
> > looks good, I'll use that instead of my hack.
>
> Look out for bugs. It's one of my very first emacs-lisp hacks.
>
> > I've a minor ideas to add:
> >
> > Instead just append the telephone number to the end of the
> > dial command one could use (org-replace-escapes STRING TABLE), that
> > allows little more flexible commandline generation.
>
> Thanks for the hint. Could you please give me an example where this
> increased flexibility would be required?
I am using linphone too, where that just works to append the
sanitized telephone number at the end. But I can imagine that other
dial programs may have different calling conventions. Also I may feel a
bit safer by quoting the telephone number, For example:
linephone -c 'sip:%n'
Maybe in the long run (I have no urge here, works for me now).
You/we/someone could make this whole thing more generic, handling
different kinds of communication protocols (I made another one for
xmpp: meanwhile).
tel: urls are somewhat simple https://www.ietf.org/rfc/rfc3966.txt
(still surprisingly more syntax than just a number) but when you look
at sip: http://tools.ietf.org/html/rfc3261#section-19.1 things get way
more complicated.
Christian
>
> Best regards
> --
> Michael Strey
> http://www.strey.biz * https://twitter.com/michaelstrey
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sip: links
2015-06-22 15:02 ` Christian Thaeter
@ 2015-06-23 4:24 ` briangpowell .
2015-06-23 8:33 ` Christian Thaeter
0 siblings, 1 reply; 8+ messages in thread
From: briangpowell . @ 2015-06-23 4:24 UTC (permalink / raw)
To: Christian Thaeter; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]
Cool, what do you do with "xmpp:"?
On Mon, Jun 22, 2015 at 11:02 AM, Christian Thaeter <ct.orgmode@pipapo.org>
wrote:
>
>
> On 2015-06-22 11:27, Michael Strey wrote:
>
> > On So, 2015-06-21, Christian Thaeter wrote:
> >
> > [...]
> >
> > > looks good, I'll use that instead of my hack.
> >
> > Look out for bugs. It's one of my very first emacs-lisp hacks.
> >
> > > I've a minor ideas to add:
> > >
> > > Instead just append the telephone number to the end of the
> > > dial command one could use (org-replace-escapes STRING TABLE), that
> > > allows little more flexible commandline generation.
> >
> > Thanks for the hint. Could you please give me an example where this
> > increased flexibility would be required?
>
> I am using linphone too, where that just works to append the
> sanitized telephone number at the end. But I can imagine that other
> dial programs may have different calling conventions. Also I may feel a
> bit safer by quoting the telephone number, For example:
>
> linephone -c 'sip:%n'
>
> Maybe in the long run (I have no urge here, works for me now).
> You/we/someone could make this whole thing more generic, handling
> different kinds of communication protocols (I made another one for
> xmpp: meanwhile).
>
> tel: urls are somewhat simple https://www.ietf.org/rfc/rfc3966.txt
> (still surprisingly more syntax than just a number) but when you look
> at sip: http://tools.ietf.org/html/rfc3261#section-19.1 things get way
> more complicated.
>
> Christian
>
>
>
> >
> > Best regards
> > --
> > Michael Strey
> > http://www.strey.biz * https://twitter.com/michaelstrey
> >
> >
>
>
>
[-- Attachment #2: Type: text/html, Size: 2663 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: sip: links
2015-06-23 4:24 ` briangpowell .
@ 2015-06-23 8:33 ` Christian Thaeter
0 siblings, 0 replies; 8+ messages in thread
From: Christian Thaeter @ 2015-06-23 8:33 UTC (permalink / raw)
To: briangpowell .; +Cc: emacs-orgmode
On 2015-06-23 00:24, briangpowell . wrote:
> Cool, what do you do with "xmpp:"?
just opening 'psi-plus' here with a message window, I haven't figured
out how to do more (aka all this xmpp: url variants)
Again, just a crude works-for-me snippet:
;;; org-xmpp.el - Support for xmpp communication
(require 'org)
(org-add-link-type "xmpp" 'org-xmpp-open)
(defcustom org-xmpp-command "psi-plus --remote --uri='%u'"
"The Emacs command to be used to make a xmpp request."
:group 'org-link
:type '(string))
(defun org-xmpp-open (destination)
"make a xmpp to DESTINATION"
(start-process-shell-command "xmpp" nil
(org-replace-escapes org-xmpp-command
`(("%u" . ,destination)))))
(provide 'org-xmpp)
;;; org-xmpp.el ends here
Christian
>
> On Mon, Jun 22, 2015 at 11:02 AM, Christian Thaeter
> <ct.orgmode@pipapo.org> wrote:
>
> >
> >
> > On 2015-06-22 11:27, Michael Strey wrote:
> >
> > > On So, 2015-06-21, Christian Thaeter wrote:
> > >
> > > [...]
> > >
> > > > looks good, I'll use that instead of my hack.
> > >
> > > Look out for bugs. It's one of my very first emacs-lisp hacks.
> > >
> > > > I've a minor ideas to add:
> > > >
> > > > Instead just append the telephone number to the end of the
> > > > dial command one could use (org-replace-escapes STRING TABLE),
> > > > that allows little more flexible commandline generation.
> > >
> > > Thanks for the hint. Could you please give me an example where
> > > this increased flexibility would be required?
> >
> > I am using linphone too, where that just works to append the
> > sanitized telephone number at the end. But I can imagine that other
> > dial programs may have different calling conventions. Also I may
> > feel a bit safer by quoting the telephone number, For example:
> >
> > linephone -c 'sip:%n'
> >
> > Maybe in the long run (I have no urge here, works for me now).
> > You/we/someone could make this whole thing more generic, handling
> > different kinds of communication protocols (I made another one for
> > xmpp: meanwhile).
> >
> > tel: urls are somewhat simple https://www.ietf.org/rfc/rfc3966.txt
> > (still surprisingly more syntax than just a number) but when you
> > look at sip: http://tools.ietf.org/html/rfc3261#section-19.1 things
> > get way more complicated.
> >
> > Christian
> >
> >
> >
> > >
> > > Best regards
> > > --
> > > Michael Strey
> > > http://www.strey.biz * https://twitter.com/michaelstrey
> > >
> > >
> >
> >
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-06-23 8:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-20 15:23 sip: links Christian Thaeter
2015-06-21 0:39 ` Christian Thaeter
2015-06-21 10:37 ` Michael Strey
2015-06-21 16:15 ` Christian Thaeter
2015-06-22 9:27 ` Michael Strey
2015-06-22 15:02 ` Christian Thaeter
2015-06-23 4:24 ` briangpowell .
2015-06-23 8:33 ` Christian Thaeter
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).