Хочу на asterisk 13 зарегистрировать пользователя с username отличным от номера телефона.
номер - 113, username diacom.
В итоге получаю:
Код: Выделить всё
<--- SIP read from UDP:192.168.10.245:5070 --->
REGISTER sip:192.168.10.5:5080 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.245:5070;branch=z9hG4bK639256993029711520;rport
From: 113 <sip:113@192.168.10.5:5080>;tag=254378274
To: 113 <sip:113@192.168.10.5:5080>
Call-ID: 20842835110212-20056257226014@192.168.10.245
CSeq: 1 REGISTER
Contact: <sip:113@192.168.10.245:5070>
Max-Forwards: 70
Expires: 60
User-Agent: Voip Phone 1.0
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
Sending to 192.168.10.245:5070 (no NAT)
Sending to 192.168.10.245:5070 (no NAT)
<--- Transmitting (NAT) to 192.168.10.245:5070 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.10.245:5070;branch=z9hG4bK639256993029711520;received=192.168.10.245;rport=5070
From: 113 <sip:113@192.168.10.5:5080>;tag=254378274
To: 113 <sip:113@192.168.10.5:5080>;tag=as3b01ca56
Call-ID: 20842835110212-20056257226014@192.168.10.245
CSeq: 1 REGISTER
Server: Asterisk PBX 14.2.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="vesta", nonce="273e9b2f"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '20842835110212-20056257226014@192.168.10.245' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:192.168.10.245:5070 --->
REGISTER sip:192.168.10.5:5080 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.245:5070;branch=z9hG4bK25502311732838831140;rport
From: 113 <sip:113@192.168.10.5:5080>;tag=254378274
To: 113 <sip:113@192.168.10.5:5080>
Call-ID: 20842835110212-20056257226014@192.168.10.245
CSeq: 2 REGISTER
Contact: <sip:113@192.168.10.245:5070>
Authorization: Digest username="diacom", realm="vesta", nonce="273e9b2f", uri="sip:192.168.10.5:5080", response="95adc8381eae5cb8e53bbfab0c4ab87d", algorithm=MD5
Max-Forwards: 70
Expires: 60
User-Agent: Voip Phone 1.0
Content-Length: 0
Код: Выделить всё
<------------->
--- (12 headers 0 lines) ---
Sending to 192.168.10.245:5070 (no NAT)
[Jun 21 16:02:38] WARNING[20413]: chan_sip.c:17169 check_auth: username mismatch, have <113>, digest has <diacom>
<--- Transmitting (NAT) to 192.168.10.245:5070 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.10.245:5070;branch=z9hG4bK25502311732838831140;received=192.168.10.245;rport=5070
From: 113 <sip:113@192.168.10.5:5080>;tag=254378274
To: 113 <sip:113@192.168.10.5:5080>;tag=as3b01ca56
Call-ID: 20842835110212-20056257226014@192.168.10.245
CSeq: 2 REGISTER
Server: Asterisk PBX 14.2.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
<------------>
[Jun 21 16:02:38] NOTICE[20413]: chan_sip.c:28536 handle_request_register: Registration from '113 <sip:113@192.168.10.5:5080>' failed for '192.168.10.245:5070' - Username/auth name mismatch
defaultuser = diacom
fromuser = diacom
username = diacom (ругается на depricated)
В общем, чтобы я не делал, всегда упираюсь в эту строку:
chan_sip.c:17169 check_auth: username mismatch, have <113>, digest has <diacom>
что не так? asterisk не умеет различать username от номера телефона?
при этом:
sip show peer 113
Код: Выделить всё
* Name : 113
Description :
Secret : <Set>
...
FromUser : diacom
....
Def. Username: diacom
....