3

update:

Probably this is because of NAT, although that might an Ekiga specific problem.

I've tried multiple clients on this machine, cannot get any SIP clients to work for me. On the same network, an Android tablet can call an IP phone, no problem, using free SIP accounts. Also, an IP phone, SPA 942, works fine with anveo. The hardphone worked fine with a free Anveo account, so I upgraded ($5/month or so?) to the paid service.


Why is linphone reporting that port 5060 is in use?

thufir@doge:~$ 
thufir@doge:~$ sudo netstat -peanut
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      0          24006       2764/dnsmasq    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          27787       2336/sshd       
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      0          121080      9291/cupsd      
tcp        0      0 0.0.0.0:119             0.0.0.0:*               LISTEN      0          19800       2117/inetd      
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      0          22477       2600/sendmail: MTA:
tcp        0      0 127.0.0.1:587           0.0.0.0:*               LISTEN      0          22478       2600/sendmail: MTA:
tcp        0      0 192.168.1.4:57926       104.20.60.241:80        TIME_WAIT   0          0           -               
tcp        0      0 192.168.1.4:60302       104.20.59.241:80        ESTABLISHED 1000       123617      9759/firefox    
tcp        0      0 192.168.1.4:59140       173.194.202.108:993     ESTABLISHED 1003       42919       4757/alpine     
tcp        0      0 192.168.1.4:32832       216.58.194.202:80       ESTABLISHED 1000       123738      9759/firefox    
tcp        0      0 192.168.1.4:57924       104.20.60.241:80        TIME_WAIT   0          0           -               
tcp        0      0 192.168.1.4:49692       35.165.39.15:443        ESTABLISHED 1000       123774      9759/firefox    
tcp        0      0 192.168.1.4:34044       173.194.203.108:993     ESTABLISHED 1000       61100       7178/alpine     
tcp        0      0 192.168.1.4:57922       104.20.60.241:80        TIME_WAIT   0          0           -               
tcp        0      0 192.168.1.4:48654       199.96.57.6:443         ESTABLISHED 1000       123739      9759/firefox    
tcp        0      0 192.168.1.4:57320       216.58.192.14:443       ESTABLISHED 1000       123765      9759/firefox    
tcp        0      0 192.168.1.4:39708       74.125.28.109:993       ESTABLISHED 1000       117469      7178/alpine     
tcp        0      0 192.168.1.4:57930       104.20.60.241:80        TIME_WAIT   0          0           -               
tcp        0      0 192.168.1.4:59144       173.194.202.108:993     ESTABLISHED 1003       42929       4757/alpine     
tcp        0      0 192.168.1.4:45048       72.21.91.29:80          ESTABLISHED 1000       126693      9759/firefox    
tcp        0      0 192.168.1.4:32772       173.194.202.108:993     ESTABLISHED 1000       60713       7178/alpine     
tcp        0      0 192.168.1.4:57326       216.58.192.14:443       TIME_WAIT   0          0           -               
tcp        0      0 192.168.1.4:49188       216.58.192.14:80        ESTABLISHED 1000       123770      9759/firefox    
tcp        0      0 192.168.1.4:41466       74.125.28.108:993       ESTABLISHED 1000       117366      7178/alpine     
tcp        0      0 192.168.1.4:45530       52.27.92.252:443        ESTABLISHED 1000       126723      9759/firefox    
tcp        0      0 192.168.1.4:55378       202.81.252.44:119       ESTABLISHED 9          117373      8590/fetchnews  
tcp        0      0 192.168.1.4:57928       104.20.60.241:80        TIME_WAIT   0          0           -               
tcp6       0      0 :::22                   :::*                    LISTEN      0          27789       2336/sshd       
tcp6       0      0 ::1:631                 :::*                    LISTEN      0          121079      9291/cupsd      
udp        0      0 0.0.0.0:38810           0.0.0.0:*                           111        19008       2200/avahi-daemon: 
udp        0      0 127.0.1.1:53            0.0.0.0:*                           0          24005       2764/dnsmasq    
udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          26745       3432/dhclient   
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           111        19006       2200/avahi-daemon: 
udp        0      0 0.0.0.0:631             0.0.0.0:*                           0          20616       2279/cups-browsed
udp6       0      0 :::43979                :::*                                111        19009       2200/avahi-daemon: 
udp6       0      0 :::5353                 :::*                                111        19007       2200/avahi-daemon: 
thufir@doge:~$ 
thufir@doge:~$ lsof -i -n -P | grep 5060
thufir@doge:~$ 
thufir@doge:~$ lsof -i :5060
thufir@doge:~$ 

screenshot:

port 5060 in use

the debug window:

message: Using (r/w) config information from .linphonerc
message: Initializing LinphoneCore 3.6.1
message: oRTP-0.22.0 initialized.
message: assigning PCMU/8000 payload type number 0
message: assigning GSM/8000 payload type number 3
message: assigning PCMA/8000 payload type number 8
message: assigning speex/8000 payload type number 110
message: assigning speex/16000 payload type number 111
message: assigning speex/32000 payload type number 112
message: assigning telephone-event/8000 payload type number 101
message: assigning G722/8000 payload type number 9
message: assigning H263/90000 payload type number 34
message: assigning theora/90000 payload type number 97
message: assigning H263-1998/90000 payload type number 98
message: assigning MP4V-ES/90000 payload type number 99
message: assigning H264/90000 payload type number 102
message: assigning VP8/90000 payload type number 103
message: assigning x-snow/90000 payload type number 96
message: assigning iLBC/8000 payload type number 100
message: assigning AMR/8000 payload type number 104
message: assigning AMR-WB/16000 payload type number 105
message: assigning 1015/8000 payload type number 106
message: assigning G726-16/8000 payload type number 107
message: assigning G726-24/8000 payload type number 108
message: assigning G726-32/8000 payload type number 109
message: assigning G726-40/8000 payload type number 113
message: assigning AAL2-G726-16/8000 payload type number 114
message: assigning AAL2-G726-24/8000 payload type number 115
message: assigning AAL2-G726-32/8000 payload type number 116
message: assigning AAL2-G726-40/8000 payload type number 117
message: assigning SILK/8000 payload type number 118
message: assigning SILK/12000 payload type number 119
message: assigning SILK/16000 payload type number 120
message: assigning SILK/24000 payload type number 121
message: assigning G729/8000 payload type number 18
message: assigning mpeg4-generic/22050 payload type number 122
message: assigning mpeg4-generic/44100 payload type number 123
message: assigning opus/48000 payload type number 124
message: assigning 1016/8000 payload type number 1
message: assigning GSM/8000 payload type number 3
message: assigning G723/8000 payload type number 4
message: assigning LPC/8000 payload type number 7
message: assigning PCMA/8000 payload type number 8
message: assigning G722/8000 payload type number 9
message: assigning L16/44100 payload type number 10
message: assigning L16/44100 payload type number 11
message: assigning G729/8000 payload type number 18
message: assigning H261/90000 payload type number 31
message: assigning MPV/90000 payload type number 32
message: assigning H263/90000 payload type number 34
message: Mediastreamer2 2.9.1 (git: 2.9.0-7-g51d3c20) starting.
message: ms_base_init() done
message: Registering all soundcard handlers
message: Card 'ALSA: default device' added
warning: Could not attach mixer to card: Invalid argument
warning: Strange, sound card HDA Intel does not seems to be capable of anything, retrying with plughw...
message: Card 'ALSA: HDA Intel' added
message: Card 'PulseAudio: default' added
message: New PulseAudio context state: PA_CONTEXT_CONNECTING
message: Registering all webcam handlers
message: Webcam StaticImage: Static picture added
message: New PulseAudio context state: PA_CONTEXT_AUTHORIZING
message: New PulseAudio context state: PA_CONTEXT_SETTING_NAME
message: New PulseAudio context state: PA_CONTEXT_READY
message: ms_voip_init() done
message: Loading ms plugins from [/usr/lib/x86_64-linux-gnu/mediastreamer/plugins]
message: Cannot open directory /usr/lib/x86_64-linux-gnu/mediastreamer/plugins: No such file or directory
message: Cannot open directory /usr/lib/liblinphone/plugins: No such file or directory
message: linphone_core_set_playback_gain_db(): no active call.
message: linphone_core_set_mic_gain_db(): no active call.
message: MTU is supposed to be 1300, rtp payload max size will be 1240
message: Could not find encoder for 1016
message: Could not find decoder for 1016
message: Could not find encoder for GSM
message: Could not find decoder for GSM
message: Could not find encoder for G723
message: Could not find decoder for G723
message: Could not find encoder for LPC
message: Could not find decoder for LPC
message: Could not find encoder for G729
message: Could not find decoder for G729
message: Could not find encoder for iLBC
message: Could not find decoder for iLBC
message: Could not find encoder for telephone-event
message: Could not find decoder for telephone-event
message: Could not find encoder for AMR
message: Could not find decoder for AMR
message: Could not find encoder for AMR-WB
message: Could not find decoder for AMR-WB
message: Could not find encoder for 1015
message: Could not find decoder for 1015
message: Could not find encoder for SILK
message: Could not find decoder for SILK
message: Could not find encoder for SILK
message: Could not find decoder for SILK
message: Could not find encoder for SILK
message: Could not find decoder for SILK
message: Could not find encoder for SILK
message: Could not find decoder for SILK
message: Could not find encoder for mpeg4-generic
message: Could not find decoder for mpeg4-generic
message: Could not find encoder for mpeg4-generic
message: Could not find decoder for mpeg4-generic
message: Could not find encoder for H261
message: Could not find decoder for H261
message: Could not find encoder for MPV
message: Could not find decoder for MPV
message: Could not find encoder for x-snow
message: Could not find decoder for x-snow
message: Could not find encoder for H264
message: TLS server method
warning: no system certificate loaded
error: eXosip: Couldn't read CA list
message: eXosip: Trusted CA folder : '/etc/ssl/certs'
warning: no system certificate loaded
message: getaddrinfo failure. 0.0.0.0:5060 (-9)
warning: Could not start tls transport on port 5060, maybe this port is already used.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: New local ip address is 192.168.1.4
message: Network state is now [UP]
message: Local interface to reach sip.linphone.org is 192.168.1.4.
error: wrong state: create transport layer first
error: wrong state: create transport layer first
error: wrong state: create transport layer first
message: allocating transaction resource 1 828422930
message: Sending a new SUBSCRIBE
error: wrong state: create transport layer first
error: wrong state: create transport layer first
error: eXosip: missing via header
message: allocating transaction resource 2 647562304
message: linphone_friend_apply() done.
message: Sending a new SUBSCRIBE
error: wrong state: create transport layer first
error: wrong state: create transport layer first
error: eXosip: missing via header
message: allocating transaction resource 3 1353760134
message: linphone_friend_apply() done.
message: Sending a new SUBSCRIBE
error: wrong state: create transport layer first
error: wrong state: create transport layer first
error: eXosip: missing via header
message: allocating transaction resource 4 885502749
message: linphone_friend_apply() done.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.
message: Local interface to reach 87.98.157.38 is 192.168.1.4.

After trying to change the SIP port to 5069:

thufir@doge:~$ 
thufir@doge:~$ linphonec
ALSA lib conf.c:4738:(snd_config_expand) Unknown parameters 0
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL default:0
ALSA lib conf.c:4738:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default:0
ALSA lib conf.c:4738:(snd_config_expand) Unknown parameters 0
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM default:0
Warning: Could not start tls transport on port 5069, maybe this port is already used.
Ready
Warning: video is disabled in linphonec, use -V or -C or -D to enable.
linphonec> 
linphonec> ports
sip port = 5069
audio rtp port = 7078
video rtp port = 9078
linphonec> 
linphonec> states
Global liblinphone state
LinphoneGlobalOn
Call states
Id |            Destination              |      State      |    Flags   |
------------------------------------------------------------------------
(empty)
Proxy registration states
           Identity                      |      State
------------------------------------------------------------
sip:[email protected]              | LinphoneRegistrationProgress
linphonec> 
linphonec> quit
Terminating...
ortp-error-cannot unsubscribe, no dialog !
ortp-error-cannot unsubscribe, no dialog !
ortp-error-cannot unsubscribe, no dialog !

thufir@doge:~$ 

From the GUI I set NAT and entered my external IP. After switching to ipv6 the GUI showed that the registration failed.

I would prefer to use linphonec, which is the CLI. It's just for chat.

I was able to use the OnSIP web-application to call an ekiga account registered on an Android tablet on the network.

see also:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743494

http://www.linuxquestions.org/questions/linux-software-2/configuring-linphone-4175485161/

http://nongnu.13855.n7.nabble.com/The-port-5060-already-used-problem-td197509.html

https://opensips.org/pipermail/users/2014-September/029913.html

1
  • 1
    Warning: Could not start tls transport on port 5069, maybe this port is already used. This looks like a real problem (it was in one case for me). Maybe you have another program running. Try something like the following to see if the port is in use: ss -aunp | grep 5069
    – A Harkness
    Nov 26, 2020 at 10:45

2 Answers 2

4

I think my better half ran into the same problem, so I installed Ubuntu (16.04) on a spare laptop and had no issue starting linphone as an admin, but could reproduce your error as a normal user. I then added the group plugdev to the normal user logged out and then back in and linphone seems to work now as it is supposed to be.

I added the group with

usermod -aG plugdev yournormalusername 

as root.

2
  • 1
    ok; plugdev group. where and how did you come across that?
    – Thufir
    Nov 22, 2017 at 16:08
  • I had a look at the groups of the admin account and this one seemed like the most promising ;)
    – sdc
    May 28, 2018 at 18:30
0

On Ubuntu 16.04 this was resolved for me by installing a newer version of linphone from their PPA:

sudo add-apt-repository ppa:linphone/release
sudo apt-get update
sudo apt-get install linphone linphone-plugin-openh264

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .