Пожалуйста, войдите здесь. Часто задаваемые вопросы О нас
Задайте Ваш вопрос

История изменений [назад]

нажмите, чтобы скрыть/показать версии 1
изначальная версия
редактировать

спросил 2012-09-26 08:34:20 +0400

alamogus Gravatar alamogus

SIP/2.0 401 Unauthorized

Все работало, но в один прекрасный день перестала работать регистрация. Астериск за натом.

sip.conf

[general]

nat=yes

register=74112401887@mmas.com:xxxxxx@80.73.85.140/74112401887

Ниже tcpdump

14:25:43.854332 IP (tos 0x0, ttl 64, id 29432, offset 0, flags [none], proto UDP (17), length 731) 192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703 REGISTER sip:mmas.com SIP/2.0 Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK54e29043;rport From: <sip:74112401877@mmas.com>;tag=as60773222 To: <sip:74112401877@mmas.com> Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 290 REGISTER User-Agent: Asterik PBX Max-Forwards: 70 Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", algorithm=MD5, uri="sip:mmas.com", nonce="506291bdcb951b00a03b1e8022340f6df136f17dfe7001c5c40f4b2e498c0998d4bcbfcbd20496948143b264dd09f2bb0e1c7ef5", response="ad16ed3c4909db5579c69841034f8f53", qop=auth, cnonce="6c7982f6", nc=00000002 Expires: 120 Contact: <sip:74112401887@46.48.181.59> Event: registration Content-Length: 0

14:25:43.943965 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570 SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK54e29043;rport=5060 From: <sip:74112401877@mmas.com>;tag=as60773222 To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c1-4bea Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 290 REGISTER Expires: 300 User-Agent: Asterik PBX WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d1ed374d7dc89334fc9df6c6173866aae7644fee5c290da3a4c63b35566db98b629cc2d01c77302425a68638168f987ab1", opaque="", stale=false, algorithm=md5 Content-Length: 0

14:25:43.944049 IP (tos 0x0, ttl 64, id 29433, offset 0, flags [none], proto UDP (17), length 731) 192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703 REGISTER sip:mmas.com SIP/2.0 Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK4e816331;rport From: <sip:74112401877@mmas.com>;tag=as2a50c69c To: <sip:74112401877@mmas.com> Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 291 REGISTER User-Agent: Asterik PBX Max-Forwards: 70 Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", algorithm=MD5, uri="sip:mmas.com", nonce="506291d1ed374d7dc89334fc9df6c6173866aae7644fee5c290da3a4c63b35566db98b629cc2d01c77302425a68638168f987ab1", response="f963aefc93907226cd7170061a390a09", qop=auth, cnonce="5d42afe9", nc=00000001 Expires: 120 Contact: <sip:74112401887@46.48.181.59> Event: registration Content-Length: 0

14:25:44.024793 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570 SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK4e816331;rport=5060 From: <sip:74112401877@mmas.com>;tag=as2a50c69c To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c1-7d8d Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 291 REGISTER Expires: 300 User-Agent: Asterik PBX WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d1789811d6edc9dd0011a8a9fa599fd811db9bd086889b9cf92af943931d7be5f6acf344a4d6e1e4c8cef37386072f03e4", opaque="", stale=false, algorithm=md5 Content-Length: 0

14:25:44.024871 IP (tos 0x0, ttl 64, id 29434, offset 0, flags [none], proto UDP (17), length 731) 192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703 REGISTER sip:mmas.com SIP/2.0 Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK191ef51d;rport From: <sip:74112401877@mmas.com>;tag=as50a13006 To: <sip:74112401877@mmas.com> Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 292 REGISTER User-Agent: Asterik PBX Max-Forwards: 70 Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", algorithm=MD5, uri="sip:mmas.com", nonce="506291d1789811d6edc9dd0011a8a9fa599fd811db9bd086889b9cf92af943931d7be5f6acf344a4d6e1e4c8cef37386072f03e4", response="9d5b49d1eefa09262834e212cb4e78c4", qop=auth, cnonce="49af172e", nc=00000001 Expires: 120 Contact: <sip:74112401887@46.48.181.59> Event: registration Content-Length: 0

14:25:44.134263 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570 SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK191ef51d;rport=5060 From: <sip:74112401877@mmas.com>;tag=as50a13006 To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c1-6739 Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 292 REGISTER Expires: 300 User-Agent: Asterik PBX WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d17e3b6d00c4abadb8dd2233a4e96b1a4548f5262dd561586ee2cc53c3f8dc7181a8d522fc494e0c18dbc4274e6c379317", opaque="", stale=false, algorithm=md5 Content-Length: 0

14:25:44.134341 IP (tos 0x0, ttl 64, id 29435, offset 0, flags [none], proto UDP (17), length 731) 192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703 REGISTER sip:mmas.com SIP/2.0 Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK5c70c68f;rport From: <sip:74112401877@mmas.com>;tag=as1183bcfd To: <sip:74112401877@mmas.com> Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 293 REGISTER User-Agent: Asterik PBX Max-Forwards: 70 Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", algorithm=MD5, uri="sip:mmas.com", nonce="506291d17e3b6d00c4abadb8dd2233a4e96b1a4548f5262dd561586ee2cc53c3f8dc7181a8d522fc494e0c18dbc4274e6c379317", response="567e8053be3f0cb556b23e6e0034e381", qop=auth, cnonce="3509fb18", nc=00000001 Expires: 120 Contact: <sip:74112401887@46.48.181.59> Event: registration Content-Length: 0

14:25:44.274035 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570 SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK5c70c68f;rport=5060 From: <sip:74112401877@mmas.com>;tag=as1183bcfd To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c2-300a Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 293 REGISTER Expires: 300 User-Agent: Asterik PBX WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d14d837fdc30daf75b398a3ecd4daca6aff3df87728bd0dbe64e8c99650985d2bf32ff54fc5659bb0ed081b0df3cc80a33", opaque="", stale=false, algorithm=md5 Content-Length: 0

SIP/2.0 401 Unauthorized

Все работало, но в один прекрасный день перестала работать регистрация. Астериск за натом.

sip.conf

[general]

nat=yes

register=74112401887@mmas.com:xxxxxx@80.73.85.140/74112401887

Ниже tcpdump

14:25:43.854332 IP (tos 0x0, ttl 64, id 29432, offset 0, flags [none], proto UDP (17), length 731) 731)

192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703
      REGISTER sip:mmas.com SIP/2.0
      Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK54e29043;rport
      From: <sip:74112401877@mmas.com>;tag=as60773222
      To: <sip:74112401877@mmas.com>
      Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102
      CSeq: 290 REGISTER
      User-Agent: Asterik PBX
      Max-Forwards: 70
      Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", realm="mmas.com",

algorithm=MD5, uri="sip:mmas.com", nonce="506291bdcb951b00a03b1e8022340f6df136f17dfe7001c5c40f4b2e498c0998d4bcbfcbd20496948143b264dd09f2bb0e1c7ef5", response="ad16ed3c4909db5579c69841034f8f53", qop=auth, cnonce="6c7982f6", nc=00000002 nc=00000002

    Expires: 120
      Contact: <sip:74112401887@46.48.181.59>
      Event: registration
      Content-Length: 0

0

14:25:43.943965 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 598)

80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570
      SIP/2.0 401 Unauthorized
      Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK54e29043;rport=5060
    46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK54e29043;

rport=5060

    From: <sip:74112401877@mmas.com>;tag=as60773222
      To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c1-4bea
      Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102
      CSeq: 290 REGISTER
      Expires: 300
      User-Agent: Asterik PBX
      WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d1ed374d7dc89334fc9df6c6173866aae7644fee5c290da3a4c63b35566db98b629cc2d01c77302425a68638168f987ab1", opaque="", stale=false, algorithm=md5
      Content-Length: 0

0

14:25:43.944049 IP (tos 0x0, ttl 64, id 29433, offset 0, flags [none], proto UDP (17), length 731) 731)

192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703
      REGISTER sip:mmas.com SIP/2.0
      Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK4e816331;rport
      From: <sip:74112401877@mmas.com>;tag=as2a50c69c
      To: <sip:74112401877@mmas.com>
      Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102
      CSeq: 291 REGISTER
      User-Agent: Asterik PBX
      Max-Forwards: 70
      Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", algorithm=MD5, uri="sip:mmas.com", nonce="506291d1ed374d7dc89334fc9df6c6173866aae7644fee5c290da3a4c63b35566db98b629cc2d01c77302425a68638168f987ab1", response="f963aefc93907226cd7170061a390a09", qop=auth, cnonce="5d42afe9", nc=00000001
      Expires: 120
      Contact: <sip:74112401887@46.48.181.59>
      Event: registration
      Content-Length: 0

0

14:25:44.024793 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 598)

80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570
      SIP/2.0 401 Unauthorized
      Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK4e816331;rport=5060
    46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK4e816331;

rport=5060

    From: <sip:74112401877@mmas.com>;tag=as2a50c69c
      To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c1-7d8d
      Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102
      CSeq: 291 REGISTER
      Expires: 300
      User-Agent: Asterik PBX
      WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d1789811d6edc9dd0011a8a9fa599fd811db9bd086889b9cf92af943931d7be5f6acf344a4d6e1e4c8cef37386072f03e4", opaque="", stale=false, algorithm=md5
      Content-Length: 0

14:25:44.024871 IP (tos 0x0, ttl 64, id 29434, offset 0, flags [none], proto UDP (17), length 731) 192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703 REGISTER sip:mmas.com SIP/2.0 Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK191ef51d;rport From: <sip:74112401877@mmas.com>;tag=as50a13006 To: <sip:74112401877@mmas.com> Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 292 REGISTER User-Agent: Asterik PBX Max-Forwards: 70 Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", algorithm=MD5, uri="sip:mmas.com", nonce="506291d1789811d6edc9dd0011a8a9fa599fd811db9bd086889b9cf92af943931d7be5f6acf344a4d6e1e4c8cef37386072f03e4", response="9d5b49d1eefa09262834e212cb4e78c4", qop=auth, cnonce="49af172e", nc=00000001 Expires: 120 Contact: <sip:74112401887@46.48.181.59> Event: registration Content-Length: 0

14:25:44.134263 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570 SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK191ef51d;rport=5060 From: <sip:74112401877@mmas.com>;tag=as50a13006 To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c1-6739 Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 292 REGISTER Expires: 300 User-Agent: Asterik PBX WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d17e3b6d00c4abadb8dd2233a4e96b1a4548f5262dd561586ee2cc53c3f8dc7181a8d522fc494e0c18dbc4274e6c379317", opaque="", stale=false, algorithm=md5 Content-Length: 0

14:25:44.134341 IP (tos 0x0, ttl 64, id 29435, offset 0, flags [none], proto UDP (17), length 731) 192.168.137.102.5060 > 80.73.85.140.5060: SIP, length: 703 REGISTER sip:mmas.com SIP/2.0 Via: SIP/2.0/UDP 46.48.181.59:5060;branch=z9hG4bK5c70c68f;rport From: <sip:74112401877@mmas.com>;tag=as1183bcfd To: <sip:74112401877@mmas.com> Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 293 REGISTER User-Agent: Asterik PBX Max-Forwards: 70 Authorization: Digest username="74112401877@mmas.com", realm="mmas.com", algorithm=MD5, uri="sip:mmas.com", nonce="506291d17e3b6d00c4abadb8dd2233a4e96b1a4548f5262dd561586ee2cc53c3f8dc7181a8d522fc494e0c18dbc4274e6c379317", response="567e8053be3f0cb556b23e6e0034e381", qop=auth, cnonce="3509fb18", nc=00000001 Expires: 120 Contact: <sip:74112401887@46.48.181.59> Event: registration Content-Length: 0

14:25:44.274035 IP (tos 0xc0, ttl 124, id 0, offset 0, flags [none], proto UDP (17), length 598) 80.73.85.140.5060 > 192.168.137.102.5060: SIP, length: 570 SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 46.48.181.59:5060;received=10.161.66.7;branch=z9hG4bK5c70c68f;rport=5060 From: <sip:74112401877@mmas.com>;tag=as1183bcfd To: <sip:74112401877@mmas.com>;tag=b72e12N26506283c2-300a Call-ID: 7f63988f7c0e8b153d1953b30a54465e@192.168.0.102 CSeq: 293 REGISTER Expires: 300 User-Agent: Asterik PBX WWW-Authenticate: digest realm="mmas.com", qop="auth", nonce="506291d14d837fdc30daf75b398a3ecd4daca6aff3df87728bd0dbe64e8c99650985d2bf32ff54fc5659bb0ed081b0df3cc80a33", opaque="", stale=false, algorithm=md5 Content-Length: 0

0

Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией GNU GPL.