BelledonneCommunications / linphone-desktop

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of git://git.linphone.org/linphone-desktop.git
https://linphone.org/
GNU General Public License v3.0
393 stars 201 forks source link

Issue making CLI calls with non-active acounts #745

Open ifpv22 opened 1 year ago

ifpv22 commented 1 year ago

Hi,

I'm using Linphone Desktop through the command line to place calls (on Windows 11). If I only have one proxy SIP account configured on the program, the call is made correctly:

linphone "call sip-address=sip:ZZZZZZZ@192.168.4.100"

[17:24:38:609][00000206C7C823D0][Info]"Open Linphone app."
[17:24:38:609][00000206C7C823D0][Info]"Creating subwindow: `qrc:/ui/views/App/Calls/CallsWindow.qml`."
[17:24:38:790][00000206C7C823D0][Info]"Subwindow status: `1`."
[17:24:38:823][00000206C7C823D0][Info]"Creating subwindow: `qrc:/ui/views/App/Settings/SettingsWindow.qml`."
[17:24:38:854][00000206C7C823D0][Info]"Subwindow status: `1`."
[17:24:39:459][00000206C7C823D0][Info]"Execute deferred command:" QHash(("sip-address", "sip:ZZZZZZZ@192.168.4.100"))
[17:24:39:459][00000206C7C823D0][Info]"Notify event count: 0."
[17:24:39:816][00000206C7C823D0][Info]"Notify event count: 0."
[17:24:40:126][00000206C7C823D0][Info]"Notify event count: 0."
[17:24:40:133][00000206C7C823D0][Info]"Add call:" "sip:353@192.168.4.100" "sip:ZZZZZZZ@192.168.4.100"
[17:24:40:229][00000206C7C823D0][Debug]QML Camera status : false
[17:24:42:945][00000206C7C823D0][Info]"Update (`sip:ZZZZZZZ@192.168.4.100`, `sip:353@192.168.4.100`) from chat call."
[17:24:43:317][00000206C7C823D0][Debug]QML Camera status : false
[17:24:43:349][00000206C7C823D0][Info]"Removing " CallModel " : " CallModel(0x206d76eedd0)

The issue happens when I have two or more proxy SIP accounts configured on the program. If the call that I want to make uses the SIP account that is selected as "active" at that moment, things work well. However, if I place a call using an account that is not selected as active, the call screen pops up, and then suddenly closes itself, and no call is made.

For example, here the active account is 192.168.4.200, and I want to use account 192.168.4.100 from CLI:

linphone "call sip-address=sip:ZZZZZZZ@192.168.4.100"

C:\Program Files\Linphone\bin>[17:20:01:159][000001C83FD34810][Info]"Starting Linphone (bin: linphone)"
[17:20:01:159][000001C83FD34810][Info]"Use locale: en_US with language: English"
[17:20:01:159][000001C83FD34810][Info]"Running secondary app success. Kill it now."
[17:20:01:159][000001E9A47E4890][Info]"Received command from other application: `call sip-address=sip:ZZZZZZZ@192.168.4.100`."
[17:20:01:159][000001C83FD34810][Info]"Destroying app..."
[17:20:01:159][000001E9A47E4890][Info]"Detecting cli command: `call sip-address=sip:ZZZZZZZ@192.168.4.100`..."
[17:20:01:159][000001E9A47E4890][Info]"Execute command:" QHash(("sip-address", "sip:ZZZZZZZ@192.168.4.100"))
[17:20:01:179][000001E9A47E4890][Info]"Add call:" "sip:TP001@192.168.4.200" "sip:ZZZZZZZ@192.168.4.100"
[17:20:01:206][000001E9A47E4890][Debug]QML Camera status : false
[17:20:01:381][000001E9A47E4890][Info]"Update (`sip:ZZZZZZZ@192.168.4.100`, `sip:TP001@192.168.4.200`) from chat call."
[17:20:01:445][000001E9A47E4890][Debug]QML Camera status : false
[17:20:01:445][000001E9A47E4890][Debug]QML Camera status : false
[17:20:01:479][000001E9A47E4890][Info]"Removing " CallModel " : " CallModel(0x1e9bbd8fa70)

If then I select this second account as active (using the screen that appears clicking on the green button next to the home one) and repeat the process, the call works perfectly.

So my question is: is this some kind of bug? Am I missing something? I assumed (maybe wrongly) that as long as the SIP account to use was configured on the program, it will automatically switch it to "active".