VoIP app with PJSIP



  • This thread is further discussion from my early thread
    I need to create VoIP Application in Ubuntu Touch, since it using Linux Kernel. I assume it's possible to create App with existing VoIP library that run on linux. My choice is PJSIP, since it's still on active development and many SIP sever using this library.
    So I follow to build this library in linux environment. It can build smoothly without error. But the problem happened when I run the executable binary, system forced to reboot.
    0_1531727883626_gmnx@Chaosmatic: ~_172.png

    I compare this with my Raspberry that run PJSIP too, the output message stopped before it can show available device with ALSA. I reproduce the crash and capture the system log before it reboot. Got something like this
    0_1531728093205_gmnx@Chaosmatic: ~_175.png

    I didn't know why ALSA can't found valid playback route from source to sink
    and this is the output when I'm using aplay -l and arecord -l

    phablet@ubuntu-phablet:~$ aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 0: MultiMedia1 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 1: MultiMedia2 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 2: CS-Voice (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 3: VoIP (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 4: MultiMedia3 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 5: SLIMBUS_0 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 6: INT_FM Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 7: AFE-PROXY RX msm-stub-rx-7 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 10: AUXPCM Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 11: SLIMBUS_1 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 12: SLIMBUS_3 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 13: SLIMBUS_4 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 14: VoLTE (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 15: MultiMedia5 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 20: QCHAT (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 21: HDMI_RX_HOSTLESS (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 22: Voice2 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 23: INT_HFP_BT Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 33: SLIMBUS_2 Hostless Playback taiko_rx2-33 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 35: MultiMedia9 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 36: VoWLAN (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 37: (Internal BT-SCO Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 39: (Internal FM Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 41: (AFE Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 43: (AUX PCM Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 44: (AUX PCM Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 45: (Sec AUX PCM Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 46: (Sec AUX PCM Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 47: (Slimbus Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 49: (Slimbus1 Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 51: (Slimbus3 Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 53: (Slimbus4 Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 57: (Voice Farend Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 58: (Voice2 Farend Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    
    phablet@ubuntu-phablet:~$ arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 0: MultiMedia1 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 1: MultiMedia2 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 2: CS-Voice (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 3: VoIP (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 5: SLIMBUS_0 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 6: INT_FM Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 8: AFE-PROXY TX msm-stub-tx-8 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 10: AUXPCM Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 11: SLIMBUS_1 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 12: SLIMBUS_3 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 13: SLIMBUS_4 Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 14: VoLTE (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 15: MultiMedia5 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 16: Listen 1 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 20: QCHAT (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 22: Voice2 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 23: INT_HFP_BT Hostless (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 25: Listen 2 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 26: Listen 3 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 27: Listen 4 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 28: Listen 5 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 29: Listen 6 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 30: Listen 7 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 31: Listen 8 Audio Service (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 32: Slimbus4 Capture taiko_vifeedback-32 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 34: SLIMBUS_2 Hostless Capture taiko_tx2-34 []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 35: MultiMedia9 (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 36: VoWLAN (*) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 38: (Internal BT-SCO Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 40: (Internal FM Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 42: (AFE Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 43: (AUX PCM Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 44: (AUX PCM Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 45: (Sec AUX PCM Playback) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 46: (Sec AUX PCM Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 48: (Slimbus Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 50: (Slimbus1 Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 52: (Slimbus3 Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 54: (Voice Uplink Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 55: (Voice Downlink Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: msm8974taikomtp [msm8974-taiko-mtp-snd-card], device 56: (Slimbus5 Capture) []
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    
    

    Have anyone successfully build VoIP library in Ubuntu Touch?



  • @gmnx Marius' fork of the uMatriks app has VoIP capabilities, if that's any help: https://open-store.io/app/umatriks.mariogrip.test



  • @gmnx I've pinged some developers who maybe can help you :)



  • @GMNX is that a nexus 4? :) the nexus 4 gave me something like that recently... ;-)
    So I'm on unknown ground too, so i can't give you an ready made answer, but I'm very interested in you project since we started to integrate mycroft (also python with audio in/out) some weeks ago and experienced very similar perhaps the same issues. First it made some difference whether the application was started over ssh or directly in the ubuntu-touch terminal. We had less problems via ssh (but try if its the same for you), but there are some environment variables set (in ut touch terminal, find them here also) regarding pulseaudio that you may want to set in the terminal you're using over ssh. That leads us to the second point: (if its not already the case) i think you should try to use pulseaudio and not alsa directly. Starting mycroft is crashing some devices, while on turbo you have to playback some audio to start mycroft properly, and on some devices it simply starts up without causing problems (see the table here). So perhaps I have some time next to reproduce what you've done so far and maybe we get a bit further together...



  • @3arn0wl I don't know, seems uMatriks can't use my Asterisk Server. Is uMatriks must use their own server to log in into the App?
    0_1531805924938_photo_2018-07-17_11-59-25.resized.jpg

    @advocatux Thanks, I hope VoIP using SIP URI can be added into phone account. So people naturally can using VoIP service in ubuntu phone without using third party App. Like in Xiaomi MIUI
    0_1531805090068_Untitled 1.png

    @hummlbach I'm using One Plus One(Bacon), you have the same result when I see in your MyCroft Status.
    About Pulseaudio, I need more time to research PJSIP using PulseAudio. Is that more stable than ALSA? or Ubuntu Touch in default using PulseAudio rather than ALSA?

    Did anyone know where I can get Sound in/out mechanism in Ubuntu Touch ? It seems different from another Ubuntu flavor



  • @gmnx these two projects could be interesting for you, Fluffychat [0] (more complete client than uMatriks now) and UBports-Linphone [1].

    [0] https://github.com/ChristianPauly/fluffychat/
    [1] https://gitlab.com/ubports-linphone



  • @GMNX yes ut uses pulseaudio. For example the volume buttons do not influence the volume of mycroft, if you don't set the pulseaudio environment variables (refered to above) in the shell before starting it... And its not about stability, as far as I understood its just another level of abstraction. I think alsa does not handle the volume per application as pulseaudio does...(??) Disclaimer: dangerous half knowledge ;-)



  • @gmnx As I understand it, Matrix is all about using one's own server, but that's as much as I know.

    Nextcloud also has a VoIP app... And I know there have been calls for closer integration of Nextcloud's services into UBports' code...


  • Infrastructure

    Matrix is NOT a SIP-compatible system, so dont try to log in there with a phone number...

    BR



  • Did you pursue this any further? I'm looking for a decent voip app for ubuntu phone and would not fear to develop a UI or packaged app myself, but I guess the backend library to talk to the sip/voip server would be the most important piece. And nobody wants to reinvent the wheel, right? 😉



  • @te-online there's a current effort underway developing a Linphone app for UT.

    I've PMed you the link (to avoid spambots here).



  • @advocatux
    Skype needs a Microsoft ID to login now
    more need for an alternative..!!



  • @marathon2422 yes, we need as much native apps as possible :)



  • As GNU Ring (https://ring.cx) is based on PJSIP, maybe they can be of help for you. (The clients can work p2p and with classic SIP accounts.)




  • Marketing

    quick update to this thread (sept 2018). Linphone app is getting really, really good and is already working for SIP I've tested with my business SIP phone and it's now 'working' . There is a telegram group and also a kind of active community around this app if anyone is interested you can PM me or if @CiberSheep wants to open the group up in this thread he can....


Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.