1 Reply Latest reply on Jul 8, 2015 3:49 AM by chiara

    rpi B+, cirrus audio card, linphone(CLI).

    leehongwoo

      Hi!.

      I have tested the voip softphone in raspberry pi.

      Specific environment is, rpi B+, cirrus audio card, linphone(CLI).

      Use the command 'aplay' has confirmed the sound recording and sound output.

      But, voip client(linphonec) is not succeed.

       

      1. The test was as follows:

      1) Voip Test Environment

         - IP PBX         => 192.168.1.4
         - rpi tel no.    => 1001
         - remote tel no. => 1000
         - ~/.asoundrc      =>
           pcm.!default {
                type hw
                card sndrpiwsp
          }
           ctl.!default {
                type hw
                card sndrpiwsp
           }   
        

      2) I run the 'linphonec' comes a warning message as shown below and voip registration is successful.
       
         pi@raspberrypi:~$ linphonec <enter>
        
        ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 0
        ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL default:0
        ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 0
        ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default:0
        ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 0
        ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default:0
        ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 1
        ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL default:1
        ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 1
        ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default:1
        ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 1
        ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default:1

        Ready
        Warning: video is disabled in linphonec, use -V or -C or -D to enable.
        linphonec> Registration on sip:192.168.1.4 successful.

       

      3) When I connect call, we get the following error message.

        linphonec> call 1000  <enter>

        Establishing call id to <sip:1000@192.168.1.4>, assigned id 1
        Contacting <sip:1000@192.168.1.4>
        linphonec> Call 1 to <sip:1000@192.168.1.4> in progress.
        linphonec> Remote ringing.
        linphonec> Remote ringing...

        linphonec> Call 1 to <sip:1000@192.168.1.4> ringing.
        ortp-error-alsa_open_w: Error setting params for more than 3 seconds
        ortp-error-alsa_open_w: Error setting params for more than 3 seconds
        ortp-error-alsa_open_w: Error setting params for more than 3 seconds

        Call 1 with <sip:1000@192.168.1.4> connected.
        Call answered by <sip:1000@192.168.1.4>.
        linphonec> ortp-error-alsa_open_w: Error setting params for more than 3 seconds
        ortp-error-alsa_open_w: Error setting params for more than 3 seconds
        Media streams established with <sip:1000@192.168.1.4> for call 1.
        ortp-error-alsa_open_r: Error setting params for more than 3 seconds
        ortp-error-alsa_open_r: Error setting params for more than 3 seconds

       

      2. I do not know the meaning of these error messages.

         (ortp-error-alsa_open_w, ortp-error-alsa_open_r)
        
         What is the reason that voice input and output not running?
           

      Thanks.

        • Re: rpi B+, cirrus audio card, linphone(CLI).
          chiara

          Hi,

          I'm in the same situation, but triyng to start as sudo I get:

           

          $ sudo linphonec

          ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 0

          ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL default:0

          ALSA lib conf.c:4687:(snd_config_expand) Unknown parameters 1

          ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL default:1

          Ready

           

           

          then with python script at: https://wiki.linphone.org/wiki/index.php/Raspberrypi:start

          I'm able to answer the calls but still no real audio output :

           

           

          INFO:root:channel [0x1ab09a0] [382] bytes parsed

          INFO:root:Incoming INVITE has ACK, dialog is happy

          INFO:root:Bandwidth usage for call [0x1ac5d00]:

              RTP  audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

              RTCP audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

          INFO:root:Thread processing load: audio=0.007688    video=0.000000

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 209698 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 414563 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 619152 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 823934 micros)

          INFO:root:Bandwidth usage for call [0x1ac5d00]:

              RTP  audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

              RTCP audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

          INFO:root:Thread processing load: audio=0.007688    video=0.000000

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 1028592 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 1233288 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 1438019 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 1642701 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 1847424 micros)

          INFO:root:Bandwidth usage for call [0x1ac5d00]:

              RTP  audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

              RTCP audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

          INFO:root:Thread processing load: audio=0.007688    video=0.000000

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 2052518 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 2257142 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 2461960 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 2666555 micros)

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          WARNING:root:alsa_open_r: Error setting params (for 2871398 micros)

          INFO:root:Bandwidth usage for call [0x1ac5d00]:

              RTP  audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

              RTCP audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

          INFO:root:Thread processing load: audio=0.007688    video=0.000000

          WARNING:root:alsa_set_params: The period size 256 is not supported by your hardware.

          ==> Using 256 instead.

          WARNING:root:alsa_set_params: periodsize:256 Using 256

          WARNING:root:alsa_set_params: period:8 Using 8

          WARNING:root:alsa_set_params: could not obtain hw buffer size.

          WARNING:root:alsa_set_params: Error setting HW params:Invalid argument

          ERROR:root:alsa_open_r: Error setting params for more than 3 seconds

          INFO:root:Stun packet sent for session [0x1b0a080]

          WARNING:root:MSAudio MSTicker: We are late of 3077 miliseconds.

          INFO:root:MSAudioMixer [0x1b2b0e8] is entering bypass mode.

          INFO:root:alsa_open_w: opening default at 8000Hz, bits=16, stereo=0

          WARNING:root:alsa_set_params: periodsize:256 Using 512

          WARNING:root:alsa_set_params: period:8 Using 8

          INFO:root:alsa_open_w: Audio params set

          WARNING:root:MSAudio MSTicker: We are late of 3079 miliseconds.

          INFO:root:Sending RTCP RR compound message on session [0x1b0a080].

          INFO:root:MSAudioMixer [0x1ac4c98] is entering bypass mode.

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:MSAudio_stream_iterate[0x1b0d990], local statistics available:

              Local current jitter buffer size:   0.0ms

          INFO:root:Linphone core [0x1aad678] notifying [call_stats_updated]

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:channel [0x1ab09a0]: keep alive sent to [UDP://10.7.208.245:5060]

          INFO:root:Bandwidth usage for call [0x1ac5d00]:

              RTP  audio=[d=242.1,u= 51.5], video=[d=  0.0,u=  0.0] kbits/sec

              RTCP audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

          INFO:root:Thread processing load: audio=2.534202    video=0.000000

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:Bandwidth usage for call [0x1ac5d00]:

              RTP  audio=[d= 82.7,u=  0.9], video=[d=  0.0,u=  0.0] kbits/sec

              RTCP audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

          INFO:root:Thread processing load: audio=2.940456    video=0.000000

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:MSAudio stream [0x1b0d990]: receiving RTCP SR

          INFO:root:Linphone core [0x1aad678] notifying [call_stats_updated]

          INFO:root:Sending RTCP RR compound message on session [0x1b0a080].

          INFO:root:MSAudio_stream_iterate[0x1b0d990], local statistics available:

              Local current jitter buffer size: 272.6ms

          INFO:root:Linphone core [0x1aad678] notifying [call_stats_updated]

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:Bandwidth usage for call [0x1ac5d00]:

              RTP  audio=[d= 82.7,u=  0.8], video=[d=  0.0,u=  0.0] kbits/sec

              RTCP audio=[d=  0.0,u=  0.0], video=[d=  0.0,u=  0.0] kbits/sec

          INFO:root:Thread processing load: audio=3.339199    video=0.000000

          INFO:root:Stun packet sent for session [0x1b0a080]

          INFO:root:channel [0x1ab09a0]: received [417] new bytes from [UDP://10.7.208.245:5060]:

          BYE sip:toto@10.7.208.199 SIP/2.0

          Via: SIP/2.0/UDP 10.7.208.245:5060;branch=z9hG4bK26201574;rport

          Max-Forwards: 70

          From: "Chiara" <sip:105@10.7.208.245>;tag=as6225e978

          To: <sip:305@10.7.208.199>;tag=uZm3gIO

          Call-ID: 117aa852007835075531345261983efe@10.7.208.245:5060

          CSeq: 103 BYE

          User-Agent: FPBX-12.0.68(11.18.0)

          X-Asterisk-HangupCause: Normal Clearing

          X-Asterisk-HangupCauseCode: 16

          Content-Length: 0

           

           

          INFO:root:channel [0x1ab09a0] [417] bytes parsed

          INFO:root:Changing [server] [BYE] transaction [0x1b28350], from state [INIT] to [TRYING]

          INFO:root:Changing [server] [BYE] transaction [0x1b28350], from state [TRYING] to [COMPLETED]

          INFO:root:channel [0x1ab09a0]: message sent to [UDP://10.7.208.245:5060], size: [305] bytes

          SIP/2.0 200 Ok

          Via: SIP/2.0/UDP 10.7.208.245:5060;branch=z9hG4bK26201574;rport

          From: "Chiara" <sip:105@10.7.208.245>;tag=as6225e978

          To: <sip:305@10.7.208.199>;tag=uZm3gIO

          Call-ID: 117aa852007835075531345261983efe@10.7.208.245:5060

          CSeq: 103 BYE

          User-Agent: (belle-sip/1.4.0)

          Supported: outbound

           

           

          INFO:root:Dialog [0x1b2ad08]: now updated by transaction [0x1b28350].

          INFO:root:dialog [0x1b2ad08] deleted.

          INFO:root:Current call terminated...

          INFO:root:ms_ticker_set_time_func: ticker's time method updated.

          INFO:root:===========================================================

          INFO:root:             AUDIO SESSION'S RTP STATISTICS               

          INFO:root:-----------------------------------------------------------

          INFO:root:sent                                          0 packets

          INFO:root:                                              0 duplicated packets

          INFO:root:                                              0 bytes 

          INFO:root:received                                    300 packets

          INFO:root:                                              0 duplicated packets

          INFO:root:                                          51600 bytes 

          INFO:root:incoming delivered to the app             13416 bytes 

          INFO:root:incoming cumulative lost                      0 packets

          INFO:root:incoming received too late                    9 packets

          INFO:root:incoming bad formatted                        0 packets

          INFO:root:incoming discarded (queue overflow)           0 packets

          INFO:root:===========================================================

          INFO:root:ms_filter_unlink: MSAlsaRead:0x1ac3110,0-->MSVolume:0x1b298d8,0

          INFO:root:ms_filter_unlink: MSVolume:0x1b298d8,0-->MSAudioMixer:0x1b2b0e8,0

          INFO:root:ms_filter_unlink: MSAudioMixer:0x1b2b0e8,0-->MSUlawEnc:0x1ac4590,0

          INFO:root:ms_filter_unlink: MSUlawEnc:0x1ac4590,0-->MSRtpSend:0x1ad9260,0

          INFO:root:ms_filter_unlink: MSRtpRecv:0x1b073d0,0-->MSUlawDec:0x1b0d7a0,0

          INFO:root:ms_filter_unlink: MSUlawDec:0x1b0d7a0,0-->MSGenericPLC:0x1ad3578,0

          INFO:root:ms_filter_unlink: MSGenericPLC:0x1ad3578,0-->MSDtmfGen:0x1adc120,0

          INFO:root:ms_filter_unlink: MSDtmfGen:0x1adc120,0-->MSVolume:0x1b09f58,0

          INFO:root:ms_filter_unlink: MSVolume:0x1b09f58,0-->MSEqualizer:0x1acebf8,0

          INFO:root:ms_filter_unlink: MSEqualizer:0x1acebf8,0-->MSAudioMixer:0x1ac4c98,0

          INFO:root:ms_filter_unlink: MSFilePlayer:0x1ac5a00,0-->MSResample:0x1acdb48,0

          INFO:root:ms_filter_unlink: MSResample:0x1acdb48,0-->MSAudioMixer:0x1ac4c98,1

          INFO:root:ms_filter_unlink: MSAudioMixer:0x1ac4c98,0-->MSAlsaWrite:0x1b08588,0

          INFO:root:===========================================================

          INFO:root:                  FILTER USAGE STATISTICS                 

          INFO:root:Name                Count     Time/tick (ms)      CPU Usage

          INFO:root:-----------------------------------------------------------

          INFO:root:MSAlsaRead          622       4.95042             96.1663  

          INFO:root:MSRtpRecv           622       0.076938            1.49459  

          INFO:root:MSAlsaWrite         544       0.0645893           1.09762  

          INFO:root:MSRtpSend           622       0.0153815           0.298799 

          INFO:root:MSAudioMixer        1244      0.00734276          0.28505  

          INFO:root:MSGenericPLC        622       0.00978303          0.190044 

          INFO:root:MSVolume            536       0.00924555          0.15481  

          INFO:root:MSDtmfGen           623       0.00586525          0.114121 

          INFO:root:MSFilePlayer        623       0.00355118          0.0690956

          INFO:root:MSUlawDec           78        0.0279981           0.0689681

          INFO:root:MSEqualizer         536       0.00362003          0.060615 

          INFO:root:MSUlawEnc           0         0                   0        

          INFO:root:MSResample          0         0                   0        

          INFO:root:MSSpeexEC           0         0                   0        

          INFO:root:===========================================================

          INFO:root:Linphone core [0x1aad678] notifying [show]

          INFO:root:Linphone core [0x1aad678] notifying [display_status]

          INFO:root:Call 0x1ac5d00: moving from state LinphoneCallStreamsRunning to LinphoneCallEnd

          INFO:root:MSAudio MSTicker thread exiting

          INFO:root:Linphone core [0x1aad678] notifying [call_log_updated]

          INFO:root:Resetting the current call

          INFO:root:Linphone core [0x1aad678] notifying [call_state_changed]

          INFO:root:Notifying soundcard that we don't need it anymore for calls.

          INFO:root:Dialog [0x1b2ad08] terminated for op [0x1acda48]

          INFO:root:Call 0x1ac5d00: moving from state LinphoneCallEnd to LinphoneCallReleased

          INFO:root:Linphone core [0x1aad678] notifying [call_state_changed]

          INFO:root:Notifying soundcard that we don't need it anymore for calls.

          INFO:root:op [0x1acda48] : set_or_update_dialog() current=[0x1b2ad08] new=[(nil)]

           

          Any suggestion?