PINE64
redirect incoming/outgoing calls ans sms - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: General Discussion on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=127)
+--- Thread: redirect incoming/outgoing calls ans sms (/showthread.php?tid=11985)



redirect incoming/outgoing calls ans sms - Frexit - 10-29-2020

Hy, i'm currently developping calendar and contacts webapps using node.js as websocket.
I'm searching for all available CLI commands/systemd units doing the following :
- detect an incoming call and forward the phone number directly to a local URL.
- detect an incoming sms and forward the phone number and the message datas to a local URL.
- making a new call from the CLI (providing of course the phone number).
- sending a new sms from the CLI (providing the phone number to call + datas).
Thanks for your help.


RE: redirect incoming/outgoing calls ans sms - wibble - 10-30-2020

Both ModemManager and oFono use dbus interfaces that you should be able to interact with. ModemManager has mmcli as a thin command line wrapper round the dbus interface. I don't know if oFono has an equivalent, or expects you to use something like dbus-send instead. I'm not sure either of these will let you subscribe to signals either, so you may need to do that yourself for detecting incoming stuff. On the 'making a new call' front they will create the call, but it'll be up to you to make the audio routing changes needed for you to be able to hear and be heard.


RE: redirect incoming/outgoing calls ans sms - Frexit - 11-14-2020

Thanks for your response. To make a new call from CLI with node.js, i finally used "pkexec --user mobian env DISPLAY=:0 XAUTHORITY=/home/mobian/.Xauthority calls -l $NUMBER", and it works - even with the lock screen on...
I rewrote my contact app Cockatoo (which is now very similar with the old one on Firefox OS) and my Cactus (calendar) webapp.
These apps are still in dev, but you can already test and use them if you want (cf. https://alsatux.com/Pinephone).
I must admit : dbus is a lot more complicated for me, and i don't have an eternity to find the good commands.
So if someone knows how to retrieve the phone number when a call is coming, i could then easily open the browser to Cockatoo URL, then retrieve the contact associated...