jami-project issueshttps://git.jami.net/savoirfairelinux/jami-project/-/issues2022-01-09T16:55:38Zhttps://git.jami.net/savoirfairelinux/jami-project/-/issues/1312Broken dbus interface2022-01-09T16:55:38ZalzxBroken dbus interfacehello there
I use Jami everyday, as VoIP client on Debian (still on Buster, previous stable version).
In time I even wrote some bash crontab scripts for automating stuff (reliably stopping vlc if there is an incoming call, answering a c...hello there
I use Jami everyday, as VoIP client on Debian (still on Buster, previous stable version).
In time I even wrote some bash crontab scripts for automating stuff (reliably stopping vlc if there is an incoming call, answering a call with a global KDE shortcut, etc). They use `dbus-monitor` and `qdbus`, it's awesome.<br>
**Unfortunately with `20210929` and later versions, the needed dbus interface is broken. I had to revert to `20210916`** to make my scripts work again.
Examples:
- this command
```
dbus-monitor --profile --address "$(tr '\0' '\n' < /proc/$(ps -Ao %p%c | sed '/ksmserver/!d; s/ *\([0-9]*\) *.*/\1/g')/environ | grep DBUS_SESSION_BUS_ADDRESS | cut -d"=" -f2-)" "type='signal',sender='cx.ring.Ring',path='/cx/ring/Ring/CallManager',interface='cx.ring.Ring.CallManager'"
```
monitors the arrival of the signal `incomingCallWithMedia` in a crontab job of mine. Basically, when Jami rings as a phone. Now nothing is returned.
- this command
```
qdbus --bus "$(tr '\0' '\n' < /proc/$(ps -Ao %p%c | sed '/ksmserver/!d; s/ *\([0-9]*\) *.*/\1/g')/environ | grep DBUS_SESSION_BUS_ADDRESS | cut -d"=" -f2-)" --literal cx.ring.Ring /cx/ring/Ring/CallManager cx.ring.Ring.CallManager.accept $(qdbus --bus "$(tr '\0' '\n' < /proc/$(ps -Ao %p%c | sed '/ksmserver/!d; s/ *\([0-9]*\) *.*/\1/g')/environ | grep DBUS_SESSION_BUS_ADDRESS | cut -d"=" -f2-)" --literal cx.ring.Ring /cx/ring/Ring/CallManager cx.ring.Ring.CallManager.getCallList | sed "s/{/{\"number\":/g" | jq -r '.number')
```
answers the current incoming call on a bash script, useful for a global shortcut on the keyboard. Now it does nothing.
- after getting the current account string, e.g. `2**************4` , via the (still working) one-liner
```
jamiidstring="$(qdbus --bus "$(tr '\0' '\n' < /proc/$(ps -Ao %p%c | sed '/ksmserver/!d; s/ *\([0-9]*\) *.*/\1/g')/environ | grep DBUS_SESSION_BUS_ADDRESS | cut -d"=" -f2-)" cx.ring.Ring /cx/ring/Ring/ConfigurationManager cx.ring.Ring.ConfigurationManager.getAccountList)"
```
I can tell if there is a problem connecting to my Asterisk server via the commands
```
qdbus --bus "$(tr '\0' '\n' < /proc/$(ps -Ao %p%c | sed '/ksmserver/!d; s/ *\([0-9]*\) *.*/\1/g')/environ | grep DBUS_SESSION_BUS_ADDRESS | cut -d"=" -f2-)" --literal cx.ring.Ring /cx/ring/Ring/ConfigurationManager cx.ring.Ring.ConfigurationManager.getVolatileAccountDetails $jamiidstring | sed "s/\(\[\|\]\)//g;s/Argument: a{ss} //g;s/ = / : /g" | jq '."Account.registrationCode"'
```
and
```
qdbus --bus "$(tr '\0' '\n' < /proc/$(ps -Ao %p%c | sed '/ksmserver/!d; s/ *\([0-9]*\) *.*/\1/g')/environ | grep DBUS_SESSION_BUS_ADDRESS | cut -d"=" -f2-)" --literal cx.ring.Ring /cx/ring/Ring/ConfigurationManager cx.ring.Ring.ConfigurationManager.getVolatileAccountDetails $jamiidstring | sed "s/\(\[\|\]\)//g;s/Argument: a{ss} //g;s/ = / : /g" | jq '."Account.registrationStatus"' | grep -P "\"REGISTERED"
```
In normal conditions, they return `"200"` and `"REGISTERED"`, now `"0"` and `"UNREGISTERED"` or `"ERROR_GENERIC"`. But I can still make and receive calls without problems.
As a **workaround**, I've installed the previous working version, mentioned above, with
```
mkdir -p /tmp/jamitmp; cd /tmp/jamitmp
cp /var/cache/apt/archives/jami*20210916*.deb .
sudo apt-get remove jami jami-qt jami-libclient jami-daemon
sudo dpkg -i *.deb
sudo apt-mark hold jami jami-qt jami-libclient jami-daemon
cd -;
```
But I won't be able to upgrade to future Jami packages until the dbus interface is fixed.<br>
As a temporary solution is provided, this isn't a high priority bug, but there is clearly some bad regression in the code somewhere.<br>
I'd like to add that these code lines are part of my own personal scripts so normally other humans don't see them otherwise they won't call anymore, which defeats the porpouse of automating Jami-related actions. I'm sorry if they or I appear disturbing in nature.<br>
Thank you for reading, I hope this can be fixed.<br>
Have a nice day Jami devs.Sébastien BlinSébastien Blin