VoIP/SIP Client and distro
#11
(02-21-2020, 09:56 PM)cmicallef Wrote:
(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).


Hi,

can you please provide your baresip config. I tried to get baresip working under mobian but without luck.
  Reply
#12
(02-18-2020, 02:42 PM)p1trson Wrote: so unfortunately I didn't manage to successfully install/compile it.

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

Gave it a whirl on mobian+gnome - it does build if you have 2gb of swap and 4-5hrs to spare. It lets you create an account, send messages to yourself but seems to be maxing out a cpu core so something still not right.
  Reply
#13
Would you please share the build procedure?
  Reply
#14
So I did build Jami on current Mobian and updated: https://git.jami.net/savoirfairelinux/ri...issues/809  where u can see the problems and the screenshots as well.
  Reply
#15
(11-13-2020, 02:34 PM)p1trson Wrote: Would you please share the build procedure?

Sorry, missed your message but looks like you got it working. However, even if the bugs are resolved and the interface made mobile-friendly, a problem remains: not enough people use it.
  Reply
#16
It's completely fine for me as soon as I can use it at least with my family and close contacts (and it is the current case with my laptop and ios/android but I want to switch to PP completely). Regardless of that, it's a GNU project and hopefully, people interested in security and freedom with hw like pinephone will start to use this more widely. To make that happen, I'll try to help jami project by testing and reporting bugs or anything else where I can contribute ;-)
  Reply
#17
(01-16-2021, 09:19 AM)p1trson Wrote: So I did build Jami on current Mobian and updated: https://git.jami.net/savoirfairelinux/ri...issues/809  where u can see the problems and the screenshots as well.
I tried to register at GitLab Jami but still can't post there (which is strange because I joined and post on Mobian project with no trouble). I noticed you reported "I didn't test main functionality since this qt client doesn't fit into screen properly (see screenshots),"

Does scale-to-fit (in terminal) help?

Code:
scale-to-fit jami on

or whatever the jami executable is named.

Or perhaps switching back and forth between vertical and horizontal display modes?
  Reply
#18
Yes it does (with proper jami appid). Unfortunately the chat bar (where you're supposed to type) is not visible at all as per the issue updates.
  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 275,708 03-05-2023, 11:04 AM
Last Post: Eugo
  Poll: What is your favorite distro/interface for the PinePhone? amosbatto 8 12,651 02-01-2022, 07:47 AM
Last Post: amosbatto
  Other Payment options? & I'll buy used PinePhone 3/32 any distro 503d 6 6,637 12-30-2021, 07:22 AM
Last Post: Humusk1
  Poll 2: What is your favorite distro/interface for the PinePhone? amosbatto 3 4,150 12-01-2021, 04:36 PM
Last Post: bcnaz
Question How to install a Whatsapp client on Pinephone w/ Manjaro? danimations 1 7,944 06-23-2021, 09:54 PM
Last Post: ryo
  Poll 4: What is your favorite distro/interface for the PinePhone? amosbatto 7 7,503 02-11-2021, 09:58 AM
Last Post: amosbatto
  Poll 3: What is your favorite distro/interface for the PinePhone? amosbatto 0 1,769 02-01-2021, 07:57 AM
Last Post: amosbatto
  Best distro for my use case andyj 4 5,071 11-18-2020, 05:30 AM
Last Post: andyj

Forum Jump:


Users browsing this thread: 1 Guest(s)