VIDEOCHAT  ::   FAQ  ::   Поиск  ::   Регистрация  ::   Вход

FreePBX 13, PJSIP — ошибка 401

Новичком считается только что прочитавший «Астериск - будущее телефонии»
http://asterisk.ru/knowledgebase/books
и пытающийся сделать большее

Модераторы: april22, Zavr2008

Ответить
Lufa
Сообщения: 10
Зарегистрирован: 06 авг 2015, 15:48

FreePBX 13, PJSIP — ошибка 401

Сообщение Lufa »

Привет.

Новая инсталляция FreePBX 13.0.190.7.

1) Создаю Extension типа chanSIP (порт 5061).

* Настраиваю програмный SIP-клиент. Все работает.
* Настраиваю IP-телефон D-Link. Все работает.

2) Создаю Extension типа PJSIP (порт 5060).

* Настраиваю програмный SIP-клиент. Все работает.
* Настраиваю IP-телефон D-Link. Не работает. Ошибка 401.

Не то чтобы критично, но принципиально — почему не работает? Помогите разобратся, пожалуйста.

Пароли менял. Настройки клиента проверял.
Логи коннекта:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:

Код: Выделить всё

<--- Received SIP request (539 bytes) from UDP:192.168.0.175:5060 --->
REGISTER sip:sip3.mydomain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.175:5060;branch=z9hG4bK354177932329032428
From: "Юра" <sip:320@sip3.mydomain.com:5060>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com:5060>
Call-ID: 130812993719169-10277584626670@192.168.0.175
CSeq: 1 REGISTER
Contact: <sip:320@192.168.0.175:5060>
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: DLINK DPH-150S FRU2.2.1556.591
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP response (538 bytes) to UDP:192.168.0.175:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.175:5060;rport=5060;received=192.168.0.175;branch=z9hG4bK354177932329032428
Call-ID: 130812993719169-10277584626670@192.168.0.175
From: "Юра" <sip:320@sip3.mydomain.com>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com>;tag=z9hG4bK354177932329032428
CSeq: 1 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a",opaque="2b20a2036a9860bb",algorithm=md5,qop="auth"
Server: FPBX-13.0.190.7(13.9.1)
Content-Length:  0


<--- Received SIP request (810 bytes) from UDP:192.168.0.175:5060 --->
REGISTER sip:sip3.mydomain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.175:5060;branch=z9hG4bK24176189232099522955
From: "Юра" <sip:320@sip3.mydomain.com:5060>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com:5060>
Call-ID: 130812993719169-10277584626670@192.168.0.175
CSeq: 2 REGISTER
Contact: <sip:320@192.168.0.175:5060>
Authorization: Digest username="320", realm="asterisk", nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a", uri="sip:sip3.mydomain.com", response="937f4df170bf52c0d4a0042248580d7f", algorithm=MD5, cnonce="ebcb82d2", opaque="2b20a2036a9860bb", qop=auth, nc=00000001
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: DLINK DPH-150S FRU2.2.1556.591
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP response (542 bytes) to UDP:192.168.0.175:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.175:5060;rport=5060;received=192.168.0.175;branch=z9hG4bK24176189232099522955
Call-ID: 130812993719169-10277584626670@192.168.0.175
From: "Юра" <sip:320@sip3.mydomain.com>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com>;tag=z9hG4bK24176189232099522955
CSeq: 2 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a",opaque="18e7bceb22d711ac",algorithm=md5,qop="auth"
Server: FPBX-13.0.190.7(13.9.1)
Content-Length:  0


<--- Received SIP request (809 bytes) from UDP:192.168.0.175:5060 --->
REGISTER sip:sip3.mydomain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.175:5060;branch=z9hG4bK5970161542703113333
From: "Юра" <sip:320@sip3.mydomain.com:5060>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com:5060>
Call-ID: 130812993719169-10277584626670@192.168.0.175
CSeq: 3 REGISTER
Contact: <sip:320@192.168.0.175:5060>
Authorization: Digest username="320", realm="asterisk", nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a", uri="sip:sip3.mydomain.com", response="937f4df170bf52c0d4a0042248580d7f", algorithm=MD5, cnonce="ebcb82d2", opaque="18e7bceb22d711ac", qop=auth, nc=00000001
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: DLINK DPH-150S FRU2.2.1556.591
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP response (540 bytes) to UDP:192.168.0.175:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.175:5060;rport=5060;received=192.168.0.175;branch=z9hG4bK5970161542703113333
Call-ID: 130812993719169-10277584626670@192.168.0.175
From: "Юра" <sip:320@sip3.mydomain.com>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com>;tag=z9hG4bK5970161542703113333
CSeq: 3 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a",opaque="7104a1e227b11052",algorithm=md5,qop="auth"
Server: FPBX-13.0.190.7(13.9.1)
Content-Length:  0


<--- Received SIP request (809 bytes) from UDP:192.168.0.175:5060 --->
REGISTER sip:sip3.mydomain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.175:5060;branch=z9hG4bK1205031567184602391
From: "Юра" <sip:320@sip3.mydomain.com:5060>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com:5060>
Call-ID: 130812993719169-10277584626670@192.168.0.175
CSeq: 4 REGISTER
Contact: <sip:320@192.168.0.175:5060>
Authorization: Digest username="320", realm="asterisk", nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a", uri="sip:sip3.mydomain.com", response="937f4df170bf52c0d4a0042248580d7f", algorithm=MD5, cnonce="ebcb82d2", opaque="7104a1e227b11052", qop=auth, nc=00000001
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: DLINK DPH-150S FRU2.2.1556.591
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP response (540 bytes) to UDP:192.168.0.175:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.175:5060;rport=5060;received=192.168.0.175;branch=z9hG4bK1205031567184602391
Call-ID: 130812993719169-10277584626670@192.168.0.175
From: "Юра" <sip:320@sip3.mydomain.com>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com>;tag=z9hG4bK1205031567184602391
CSeq: 4 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a",opaque="4dad26013a10d00c",algorithm=md5,qop="auth"
Server: FPBX-13.0.190.7(13.9.1)
Content-Length:  0


<--- Received SIP request (809 bytes) from UDP:192.168.0.175:5060 --->
REGISTER sip:sip3.mydomain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.175:5060;branch=z9hG4bK1106297131482020155
From: "Юра" <sip:320@sip3.mydomain.com:5060>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com:5060>
Call-ID: 130812993719169-10277584626670@192.168.0.175
CSeq: 5 REGISTER
Contact: <sip:320@192.168.0.175:5060>
Authorization: Digest username="320", realm="asterisk", nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a", uri="sip:sip3.mydomain.com", response="937f4df170bf52c0d4a0042248580d7f", algorithm=MD5, cnonce="ebcb82d2", opaque="4dad26013a10d00c", qop=auth, nc=00000001
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: DLINK DPH-150S FRU2.2.1556.591
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP response (540 bytes) to UDP:192.168.0.175:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.175:5060;rport=5060;received=192.168.0.175;branch=z9hG4bK1106297131482020155
Call-ID: 130812993719169-10277584626670@192.168.0.175
From: "Юра" <sip:320@sip3.mydomain.com>;tag=10437260
To: "Юра" <sip:320@sip3.mydomain.com>;tag=z9hG4bK1106297131482020155
CSeq: 5 REGISTER
WWW-Authenticate: Digest  realm="asterisk",nonce="1480770328/4dac68085879e3bddd5c34589cc1f05a",opaque="408b996e09458fa9",algorithm=md5,qop="auth"
Server: FPBX-13.0.190.7(13.9.1)
Content-Length:  0
Estension:
PRIME_BBCODE_SPOILER_SHOW PRIME_BBCODE_SPOILER:

Код: Выделить всё

sip3*CLI> pjsip show endpoint 320

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <ip/cidr.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  320/320                                              Unavailable   0 of inf
     InAuth:  320-auth/320
        Aor:  320                                                1
   Identify:  320-identify/320


 ParameterName                      : ParameterValue
 =========================================================
 100rel                             : yes
 accountcode                        : 
 aggregate_mwi                      : true
 allow                              : (ulaw|alaw|gsm|g726)
 allow_subscribe                    : true
 allow_transfer                     : true
 aors                               : 320
 auth                               : 320-auth
 bind_rtp_to_media_address          : false
 call_group                         : 
 callerid                           : "device" <320>
 callerid_privacy                   : allowed_not_screened
 callerid_tag                       : 
 connected_line_method              : invite
 context                            : from-internal
 cos_audio                          : 0
 cos_video                          : 0
 device_state_busy_at               : 0
 direct_media                       : true
 direct_media_glare_mitigation      : none
 direct_media_method                : invite
 disable_direct_media_on_nat        : false
 dtls_ca_file                       : 
 dtls_ca_path                       : 
 dtls_cert_file                     : 
 dtls_cipher                        : 
 dtls_fingerprint                   : SHA-256
 dtls_private_key                   : 
 dtls_rekey                         : 0
 dtls_setup                         : active
 dtls_verify                        : No
 dtmf_mode                          : rfc4733
 fax_detect                         : false
 force_avp                          : false
 force_rport                        : true
 from_domain                        : 
 from_user                          : 
 g726_non_standard                  : false
 ice_support                        : false
 identify_by                        : username
 inband_progress                    : false
 language                           : en
 mailboxes                          : 
 media_address                      : 
 media_encryption                   : no
 media_encryption_optimistic        : false
 media_use_received_transport       : false
 message_context                    : 
 moh_suggest                        : default
 mwi_from_user                      : 
 mwi_subscribe_replaces_unsolicited : false
 named_call_group                   : 
 named_pickup_group                 : 
 one_touch_recording                : false
 outbound_auth                      : 
 outbound_proxy                     : 
 pickup_group                       : 
 record_off_feature                 : automixmon
 record_on_feature                  : automixmon
 rewrite_contact                    : true
 rpid_immediate                     : false
 rtp_engine                         : asterisk
 rtp_ipv6                           : false
 rtp_keepalive                      : 0
 rtp_symmetric                      : true
 rtp_timeout                        : 0
 rtp_timeout_hold                   : 0
 sdp_owner                          : -
 sdp_session                        : Asterisk
 send_diversion                     : true
 send_pai                           : false
 send_rpid                          : false
 set_var                            : 
 srtp_tag_32                        : false
 sub_min_expiry                     : 0
 t38_udptl                          : false
 t38_udptl_ec                       : none
 t38_udptl_ipv6                     : false
 t38_udptl_maxdatagram              : 0
 t38_udptl_nat                      : false
 timers                             : yes
 timers_min_se                      : 90
 timers_sess_expires                : 1800
 tone_zone                          : 
 tos_audio                          : 0
 tos_video                          : 0
 transport                          : 
 trust_id_inbound                   : true
 trust_id_outbound                  : false
 use_avpf                           : false
 use_ptime                          : false
 user_eq_phone                      : false
 voicemail_extension                : 
Куда копать? Спасибо!
april22
Сообщения: 2187
Зарегистрирован: 09 июл 2012, 09:47

Re: FreePBX 13, PJSIP — ошибка 401

Сообщение april22 »

Для начала уберите русские имена.
Потом посмотрите.
Своими вопросами , вы загоняете меня в ГУГЛЬ.
Lufa
Сообщения: 10
Зарегистрирован: 06 авг 2015, 15:48

Re: FreePBX 13, PJSIP — ошибка 401

Сообщение Lufa »

Спасибо за ответ. Причину нашел включив дебаг в консоли.

Регистрация 320: "Source address x.x.x.x:5061 match identify 313".

Для другого Extension (313) стояла опция «Match (Permit): 192.168.0.0/24». 320 тоже шел с этой подсети и система сопоставляла клиента по IP, а не по логину. Я думал это опция "Permit" SIP. :(

Убрал Match и все заработало.

Извините за беспокойство. :)
Ответить
© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH