Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick transfer shortcuts? #260

Open
sjlongland opened this issue Feb 23, 2022 · 4 comments
Open

Quick transfer shortcuts? #260

sjlongland opened this issue Feb 23, 2022 · 4 comments

Comments

@sjlongland
Copy link

Hi all,

I might try tackle this myself at some point… but the situation is this. Sometimes you want to quickly palm off a call to a different extension. Maybe it's a blind transfer, maybe it's a interactive transfer; but it's always done the same way and always to the same extensions.

My specific use case right now is dealing with telephone scammers. I could just hang up, but I'd like to send them to an extension that wastes their time. (Said extension now is just a section of a song on permanent loop … but in the future it might be an Eliza bot or something with a voice engine in front. Or maybe Parry…)

Right now it pops up a dialogue and asks for the type of transfer and the extension, every time. You then are fumbling with choosing the extension and transfer type.

It'd be nice if there were a section where I could configure specific transfer targets, with a descriptive label and on the menus, I have a "Transfer To…" menu, with the sub-options being the specific common targets.

If others have some ideas, designs, etc… we can discuss them here.

@fbriere
Copy link
Collaborator

fbriere commented Apr 8, 2022

This somewhat reminded me of #21, which proposed the idea of scriptable plugins (albeit for SIP providers). If UI scripts were a thing, I imagine that end users would then be empowered to turn ideas such as yours into reality, all by themselves.

(Sorry, it would seem that I had fallen asleep into a nice dream for a brief moment.)

In the meantime, have you tried using the CLI, perhaps in combination with keyboard shortcuts? You could then run twinkle --cmd 'transfer XYZ' --immediate and banish those evil scammers to telephone hell with a single keystroke.

@sjlongland
Copy link
Author

@fbriere I hadn't noticed the CLI options there… but maybe I can give those a shot, should be possible to code something up with my window manager (FVWM) to trigger it.

I guess a more generic scripting environment could make sense. Maybe it's worth having a look at what's available in the Qt ecosystem… Not QtScript as it seems that's no longer being developed. As much as I abhor JavaScript, the use case is perhaps "simple" enough to warrant using QJSEngine and QML.

Allegedly, we can provide some features via a QObject instance and expose it to the runtime through https://doc.qt.io/qt-5/qjsengine.html#newQObject

(Heh, looking at issue #21 I see QML gets mentioned there too.) I suppose we need to figure out what we want to expose via the API and how the users might interact with it.

@sjlongland
Copy link
Author

$ twinkle --cmd 'transfer 666' --immediate works brilliant.

@sjlongland
Copy link
Author

This is the relevant part of my .fvwm/bindings file… in case others want to do the same thing with other window managers (the concept should carry over to others like OpenBox/FluxBox, TWM, MWM, etc)…

DestroyMenu WindowOpsMenu
AddToMenu WindowOpsMenu
+ "&Close"	Close
+ "&Move/Size"	Popup WindowMoveMenu
+ "Ma&ximise"	Maximize 100 100
+ "Sp&lit"	Popup WindowSplitMenu
+ "&Iconify"	Iconify
+ "&Switch"	WindowList Root c c
+ "More &Ops"	Popup Window
+ ""		Nop
+ "To &Desk"	Popup GoToDeskMenu
+ "To Pag&e"	Popup GoToPageMenu
+ "&Quick Launch" Popup QuickLaunchMenu
+ "Root Menu (&A)" Popup RootMenu
+ "BarButtons (&Z)" GoToBarButtons
+ "&Telephony" Popup TelephonyOps

DestroyMenu RootOpsMenu
AddToMenu RootOpsMenu
+ "&Switch"	WindowList Root c c
+ ""		Nop
+ "To &Desk"	Popup GoToDeskMenu
+ "To Pag&e"	Popup GoToPageMenu
+ "&Quick Launch" Popup QuickLaunchMenu
+ "Root Menu (&A)" Popup RootMenu
+ "BarButtons (&Z)" GoToBarButtons
+ "&Telephony" Popup TelephonyOps

DestroyMenu TelephonyOps
AddToMenu TelephonyOps
+ "&Show"		Exec exec twinkle --show
+ "&Answer"		Exec exec twinkle --cmd 'answer'
+ "&Reject"		Exec exec twinkle --cmd 'reject'
+ "&Hold"		Exec exec twinkle --cmd 'hold'
+ "R&Etrieve"		Exec exec twinkle --cmd 'retrieve'
+ "&Dump Caller"	Exec exec twinkle --cmd 'transfer 666' --immediate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants