voiceip / tinyphone

Minimalist Windows / OSx / Linux SIP Softphone with API Control
GNU General Public License v3.0
117 stars 36 forks source link

Failed get accounts #14

Closed Rysakov1986 closed 3 years ago

Rysakov1986 commented 3 years ago

Hello! If i have logged more (account1, account2) accounts, i can logout account1 POST /accounts/{{username}}@{{domain}}/logout, bur after rest POST {{host}}:6060/accounts return error http code 500:

{
    "message": "Something went Wrong :("
}

log http:

(2020-10-29 16:49:39) [INFO    ] Request: 127.0.0.1:53731 012D0DF8 HTTP/1.1 GET /accounts
(2020-10-29 16:49:39) [INFO    ] Response: 012D0DF8 /accounts 500 0

log app:

2020-10-29 16:55:52.812    account.cpp !pjsua_acc_get_info(id, &pj_ai) error: Invalid value or argument (PJ_EINVAL) (status=70004) [..\src\pjsua2\account.cpp:1022]

and after try send login account1 (POST {{host}}:6060/login) return and crash app:

{
    "account_name": "901@{{host}}",
    "id": 0,
    "message": "Account already exists, but login progress, please try again in sometime",
    "result": 202
}

if use logout all (POST {{host}}:6060/logout) no problem, all work very good!

Thx!

kingster commented 3 years ago

Thanks for reporting this issue. Will get this scenario checked and update here.

kingster commented 3 years ago

This has been resolved via #16 , please try with the latest artifacts and verify.