VoIP/SIP Client and distro
#1
Hello everyone!  Smile

Thank for you all for taking the time to read my post.

Has anyone had any success installing/building a VoIP/SIP client on the pinephone?

If so, could you please outline-

1. The distro you used (doesn't have to be Linux);
2. The VoIP/SIP client you installed/built (e.g. Linphone, BareSIP, PJSIP);
3. The codecs used; and
4. If possible, a copy of your sample config (less passwords et al).


Many thanks again in advance!
  Reply
#2
I hope I can test https://jami.net/ soon. It's not in the appstore though, how should I proceed with installation then ?

It's not purely VOIP but offers this functionality as well.
  Reply
#3
so unfortunately I didn't manage to successfully install/compile it. Following the https://github.com/savoirfairelinux/ring-project (after cloning the repo and installing bunch od dependencies) I got stuck at:
checking whether make sets $(MAKE)... yes
checking build system type... Invalid configuration `aarch64-linux-gnu': machine `aarch64' not recognized
configure: error: /bin/bash ./config.sub aarch64-linux-gnu failed
../../contrib/src/dbus-cpp/rules.mak:31: recipe for target '.dbus-cpp' failed
make: *** [.dbus-cpp] Error 1
Traceback (most recent call last):
File "./make-ring.py", line 528, in <module>
main()
File "./make-ring.py", line 515, in main
run_install(parsed_args)
File "./make-ring.py", line 322, in run_install
return subprocess.run(["./scripts/install.sh"] + install_args, env=environ, check=True)
File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['./scripts/install.sh', '-p', '4', '-g', '-c', 'client-gnome']' returned non-zero exit status 2

at step ./make-ring.py --install --global-install

I guess I'll fire up issue for jami.

done:

https://git.jami.net/savoirfairelinux/ri...issues/809

let's hope for the best Wink
  Reply
#4
(02-18-2020, 02:42 PM)p1trson Wrote: so unfortunately I didn't manage to successfully install/compile it. Following the https://github.com/savoirfairelinux/ring-project (after cloning the repo and installing bunch od dependencies) I got stuck at:
checking whether make sets $(MAKE)... yes
checking build system type... Invalid configuration `aarch64-linux-gnu': machine `aarch64' not recognized
configure: error: /bin/bash ./config.sub aarch64-linux-gnu failed
../../contrib/src/dbus-cpp/rules.mak:31: recipe for target '.dbus-cpp' failed
make: *** [.dbus-cpp] Error 1
Traceback (most recent call last):
 File "./make-ring.py", line 528, in <module>
   main()
 File "./make-ring.py", line 515, in main
   run_install(parsed_args)
 File "./make-ring.py", line 322, in run_install
   return subprocess.run(["./scripts/install.sh"] + install_args, env=environ, check=True)
 File "/usr/lib/python3.5/subprocess.py", line 708, in run
   output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['./scripts/install.sh', '-p', '4', '-g', '-c', 'client-gnome']' returned non-zero exit status 2

at step ./make-ring.py --install --global-install

I guess I'll fire up issue for jami.

done:

https://git.jami.net/savoirfairelinux/ri...issues/809

let's hope for the best Wink

Are you using Ubuntu Touch? If so, I doubt it is a jami issue given that I had a similar issue when building baresip on Ubuntu Touch.

When building baresip, you can fix the problem by explicitly stating the architecture. You can do this by running 'ARCH=aarch64 make' when building baresip.

I imagine you can set a similar variable when building jami.

PS Baresip builds and runs. I'm currently dealing with various alsa related errors. I expect those errors are arising due to my configuration for baresip being incorrect. I will investigate when I have more time.
  Reply
#5
Yes, it's Ubuntu touch. Unfortunately ... as per issue update ..it will need some work (I'll test)

"I think nobody ever tried to compile for the pinephone nor aarch64. So yeah, everything for this needs to be done."
  Reply
#6
Baresip works.

I've built deb packages for Ubuntu Touch. However, I'd like to write some patch files before releasing them. I'd release him (if this forum allows for attachments, so watch this space).

The patches will merely mute/unmute/capture/uncapture the mixers for 'Earpiece', 'Line Out' (aka the loudspeaker), 'Mic1' and 'AIF1 Data Digital ADC' on certain call events occurring. Nothing special. I'd do it now but I'm a little time poor.

I'll also post a sample configuration file for Baresip because the Pinephone can be fussy about certain sample rates, formats, channels and so on. If I have time, I might even patch the config generator so that those particulars are automatically set in the default configuration files generated by Baresip.
  Reply
#7
The need to manually change audio profiles was the problem running stock SIP clients back in the Openmoko days too. Are you adjusting mixer settings directly, or using some interface to switch audio profiles? I've been looking for a 'standard' way to do this, but haven't found a consistent one. There was the freesmartphone.org dbus interface, but that seems unused now. Alsa has alsaucm and its API equivalents, while PulseAudio has its own profile thing, but neither seem to have the push/pop capability freesmartphone.org had for returning to whatever profile was active before you changed it.
  Reply
#8
On my nexus 5 (not pinephone), linphone in the open store in Ubuntu Touch works excellently.
  Reply
#9
(02-21-2020, 06:10 AM)wibble Wrote: The need to manually change audio profiles was the problem running stock SIP clients back in the Openmoko days too. Are you adjusting mixer settings directly, or using some interface to switch audio profiles? I've been looking for a 'standard' way to do this, but haven't found a consistent one. There was the freesmartphone.org dbus interface, but that seems unused now. Alsa has alsaucm and its API equivalents, while PulseAudio has its own profile thing, but neither seem to have the push/pop capability freesmartphone.org had for returning to whatever profile was active before you changed it.

Sorry, this is going to be a quick post because I'm under the pump getting ready for a trial for work.

Presently, I am doing it the worst possible way. I've hooked bash scripts in Baresip. I'm not entirely sure if this is the best spot to handle events. Plus I could probably write a module for Baresip that allows you to call scripts on certain events taking place. The scripts call 'amixer' to mute/unmute etc.

Here's a dump of the scripts and patches. And, again sorry for the brevity as I'm under the pump. Do as you please with them.

BASH SCRIPT DUMPS


Code:
pinephone:/mnt/mmcblk2p1/home/phablet$ find . -maxdepth 1 -iname \*.sh -print -exec cat {} \;

./fix-audio.sh
#!/bin/bash
amixer -c 0 set 'AIF1 Slot 0 Digital DAC' unmute
amixer -c 0 set 'Line Out' unmute
amixer sset 'Line Out' 100%

./unmute-earpiece.sh
#!/bin/bash
amixer -c 0 set 'AIF1 Slot 0 Digital DAC' unmute
amixer -c 0 set 'Earpiece' unmute
amixer sset 'Earpiece' 100%

./mute-loudspeaker.sh
#!/bin/bash
amixer -c 0 set 'AIF1 Slot 0 Digital DAC' mute
amixer -c 0 set 'DAC' mute
amixer -c 0 set 'Line Out' mute
amixer sset 'Line Out' 0%

./mute-microphone1.sh
#!/bin/bash
amixer -c 0 sset 'AIF1 Data Digital ADC' nocap
amixer -c 0 sset 'Mic1' nocap
amixer -c 0 set 'Mic1' mute
amixer sset 'Mic1' 0%

./start-call.sh
#!/bin/bash
echo "STARTING CALL";
bash mute-loudspeaker.sh; bash unmute-earpiece.sh; bash unmute-microphone1.sh

./unmute-loudspeaker.sh
#!/bin/bash
amixer -c 0 set 'AIF1 Slot 0 Digital DAC' unmute
amixer -c 0 set 'DAC' unmute

amixer -c 0 set 'Line Out' unmute
amixer sset 'Line Out' 100%

./mute-earpiece.sh
#!/bin/bash
amixer -c 0 set 'AIF1 Slot 0 Digital DAC' unmute
amixer -c 0 set 'Earpiece' mute
amixer sset 'Earpiece' 0%

./finish-call.sh
echo "FINISHING CALL"
bash unmute-loudspeaker.sh; bash mute-earpiece.sh; bash mute-microphone1.sh

./unmute-microphone1.sh
#!/bin/bash
amixer -c 0 sset 'AIF1 Data Digital ADC' cap
amixer -c 0 sset 'Mic1' cap


PATCH DUMP


Code:
diff -u baresip-0.6.5/src/ua.c baresip-0.6.5/src/ua.c
--- baresip-0.6.5/src/ua.c
+++ baresip-0.6.5/src/ua.c
@@ -9,6 +9,6 @@
 #include "core.h"
 #include <ctype.h>
+#include <stdlib.h>
 
-
 /** Magic number */
 #define MAGIC 0x0a0a0a0a
@@ -346,5 +346,7 @@
 
        case CALL_EVENT_INCOMING:
+               ua_printf(ua, "CALL_EVENT_INCOMING\n", peeruri);
 
+
                if (contact_block_access(baresip_contacts(),
                                         peeruri)) {
@@ -373,20 +375,26 @@
                break;
 
        case CALL_EVENT_RINGING:
+               ua_printf(ua, "CALL_EVENT_RINGING\n", peeruri);
                ua_event(ua, UA_EVENT_CALL_RINGING, call, peeruri);
                break;
 
        case CALL_EVENT_PROGRESS:
+               ua_printf(ua, "CALL_EVENT_PROGRESS\n", peeruri);
                ua_printf(ua, "Call in-progress: %s\n", peeruri);
                ua_event(ua, UA_EVENT_CALL_PROGRESS, call, peeruri);
                break;
 
        case CALL_EVENT_ESTABLISHED:
+               ua_printf(ua, "CALL_EVENT_ESTABLISHED\n", peeruri);
+               system("/bin/bash /home/phablet/start-call.sh");
                ua_printf(ua, "Call established: %s\n", peeruri);
                ua_event(ua, UA_EVENT_CALL_ESTABLISHED, call, peeruri);
                break;
 
        case CALL_EVENT_CLOSED:
+               ua_printf(ua, "CALL_EVENT_CLOSED\n", peeruri);
+               system("/bin/bash /home/phablet/finish-call.sh");
                ua_event(ua, UA_EVENT_CALL_CLOSED, call, str);
                mem_deref(call);
 
@@ -394,6 +402,7 @@
                break;
 
        case CALL_EVENT_TRANSFER:
+               ua_printf(ua, "CALL_EVENT_TRANSFER\n", peeruri);
                ua_event(ua, UA_EVENT_CALL_TRANSFER, call, str);
                break;
 
@@ -402,6 +411,7 @@
                break;
 
        case CALL_EVENT_MENC:
+               ua_printf(ua, "CALL_EVENT_MENC\n", peeruri);
                ua_event(ua, UA_EVENT_CALL_MENC, call, str);
                break;
        }

(02-21-2020, 06:04 PM)tahayassen Wrote: On my nexus 5 (not pinephone), linphone in the open store in Ubuntu Touch works excellently.

Yes, I looked at that in the OpenStore. Unfortunately, they don't have a 64-bit build/release at the moment. I understand that a 64-bit build is on their TODO list. I recall seeing it mentioned on gitlab.com (https://gitlab.com/ubports-linphone/linp...ple/issues).
  Reply
#10
I tried twinkle on Mobian. I could at least hear the other person on my pinephone, but the microphone of the pinephone wasn't picking up anything. I didn't investigate further as it crashed on ending the call. And it needs to system tray to be usable. At least to initiate calls. Or you'd have to keep the main window open all the time.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  UPDATED (June 2021): 17-distro multi-boot image for Pinephone (incl. 3GiB variant) megous 182 243,892 03-05-2023, 11:04 AM
Last Post: Eugo
  Poll: What is your favorite distro/interface for the PinePhone? amosbatto 8 11,045 02-01-2022, 07:47 AM
Last Post: amosbatto
  Other Payment options? & I'll buy used PinePhone 3/32 any distro 503d 6 5,491 12-30-2021, 07:22 AM
Last Post: Humusk1
  Poll 2: What is your favorite distro/interface for the PinePhone? amosbatto 3 3,597 12-01-2021, 04:36 PM
Last Post: bcnaz
Question How to install a Whatsapp client on Pinephone w/ Manjaro? danimations 1 7,284 06-23-2021, 09:54 PM
Last Post: ryo
  Poll 4: What is your favorite distro/interface for the PinePhone? amosbatto 7 6,489 02-11-2021, 09:58 AM
Last Post: amosbatto
  Poll 3: What is your favorite distro/interface for the PinePhone? amosbatto 0 1,556 02-01-2021, 07:57 AM
Last Post: amosbatto
  Best distro for my use case andyj 4 4,385 11-18-2020, 05:30 AM
Last Post: andyj

Forum Jump:


Users browsing this thread: 1 Guest(s)