ded, спасибо за ответ!ded писал(а):У вас телефон регистрируется с sip:750@192.168.50.175:5060 на Астериск 192.168.50.1, верно? Какой между ними NAT нафиг? Tcpdump host 192.168.50.175?Попробуйте ещё что-нибудь, вдруг поможет? Это же Ваш метод?Я пробовал отключать нат-настройки в SIPDefault.cnf и менять, не помогает.
Зачем Вы там указали nat_enable: "1"?
И ещё -
image_version: "P0S3-8-12-00"
Вы на каждый рестарт телефона будете его перепрошивать?
Верно, ната нет.
Но только так заработало!
Убрал нат.
Вот что получил:
Код: Выделить всё
15:17:27.144951 IP (tos 0x60, ttl 64, id 1670, offset 0, flags [none], proto: UDP (17), length: 571) 192.168.50.185.50816 > 192.168.50.1.sip: [no cksum] SIP, length: 543
REGISTER sip:192.168.50.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.185:5060;branch=z9hG4bK3f00c96c
From: <sip:753@192.168.50.1>;tag=0012da8acf38000250c014a7-3021fd24
To: <sip:753@192.168.50.1>
Call-ID: 0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185
Max-Forwards: 70
Date: Wed, 31 Jul 2013 08:17:26 GMT
CSeq: 101 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:753@192.168.50.185:5060;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0012da8acf38>";+u.sip!model.ccm.cisco.com="8"
Content-Length: 0
Expires: 120
0x0000: 5245 4749 5354 4552 2073 6970 3a31 3932
0x0010: 2e31 3638 2e35 302e 3120 5349 502f 322e
0x0020: 300d 0a56 6961 3a20 5349 502f 322e 302f
0x0030: 5544 5020 3139 322e 3136 382e 3530 2e31
0x0040: 3835 3a35 3036 303b 6272 616e 6368 3d7a
0x0050: 3968 4734 624b 3366 3030 6339 3663 0d0a
0x0060: 4672 6f6d 3a20 3c73 6970 3a37 3533 4031
0x0070: 3932 2e31 3638 2e35 302e 313e 3b74 6167
0x0080: 3d30 3031 3264 6138 6163 6633 3830 3030
0x0090: 3235 3063 3031 3461 372d 3330 3231 6664
0x00a0: 3234 0d0a 546f 3a20 3c73 6970 3a37 3533
0x00b0: 4031 3932 2e31 3638 2e35 302e 313e 0d0a
0x00c0: 4361 6c6c 2d49 443a 2030 3031 3264 6138
0x00d0: 612d 6366 3338 3030 3032 2d37 3539 6139
0x00e0: 6235 372d 3335 3133 6533 6464 4031 3932
0x00f0: 2e31 3638 2e35 302e 3138 350d 0a4d 6178
0x0100: 2d46 6f72 7761 7264 733a 2037 300d 0a44
0x0110: 6174 653a 2057 6564 2c20 3331 204a 756c
0x0120: 2032 3031 3320 3038 3a31 373a 3236 2047
0x0130: 4d54 0d0a 4353 6571 3a20 3130 3120 5245
0x0140: 4749 5354 4552 0d0a 5573 6572 2d41 6765
0x0150: 6e74 3a20 4369 7363 6f2d 4350 3739 3430
0x0160: 472f 382e 300d 0a43 6f6e 7461 6374 3a20
0x0170: 3c73 6970 3a37 3533 4031 3932 2e31 3638
0x0180: 2e35 302e 3138 353a 3530 3630 3b74 7261
0x0190: 6e73 706f 7274 3d75 6470 3e3b 2b73 6970
0x01a0: 2e69 6e73 7461 6e63 653d 223c 7572 6e3a
0x01b0: 7575 6964 3a30 3030 3030 3030 302d 3030
0x01c0: 3030 2d30 3030 302d 3030 3030 2d30 3031
0x01d0: 3264 6138 6163 6633 383e 223b 2b75 2e73
0x01e0: 6970 216d 6f64 656c 2e63 636d 2e63 6973
0x01f0: 636f 2e63 6f6d 3d22 3822 0d0a 436f 6e74
0x0200: 656e 742d 4c65 6e67 7468 3a20 300d 0a45
0x0210: 7870 6972 6573 3a20 3132 300d 0a0d 0a
15:17:27.145513 IP (tos 0x60, ttl 64, id 20905, offset 0, flags [none], proto: UDP (17), length: 565) 192.168.50.1.sip > 192.168.50.185.50816: [udp sum ok] SIP, length: 537
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.1:5060;branch=z9hG4bK3f00c96c;received=192.168.50.185
From: <sip:753@192.168.50.1>;tag=0012da8acf38000250c014a7-3021fd24
To: <sip:753@192.168.50.1>;tag=as4c6a4723
Call-ID: 0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185
CSeq: 101 REGISTER
Server: FPBX-2.8.1(11.4.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="44050080"
Content-Length: 0
0x0000: 5349 502f 322e 3020 3430 3120 556e 6175
0x0010: 7468 6f72 697a 6564 0d0a 5669 613a 2053
0x0020: 4950 2f32 2e30 2f55 4450 2031 3932 2e31
0x0030: 3638 2e35 302e 313a 3530 3630 3b62 7261
0x0040: 6e63 683d 7a39 6847 3462 4b33 6630 3063
0x0050: 3936 633b 7265 6365 6976 6564 3d31 3932
0x0060: 2e31 3638 2e35 302e 3138 350d 0a46 726f
0x0070: 6d3a 203c 7369 703a 3735 3340 3139 322e
0x0080: 3136 382e 3530 2e31 3e3b 7461 673d 3030
0x0090: 3132 6461 3861 6366 3338 3030 3032 3530
0x00a0: 6330 3134 6137 2d33 3032 3166 6432 340d
0x00b0: 0a54 6f3a 203c 7369 703a 3735 3340 3139
0x00c0: 322e 3136 382e 3530 2e31 3e3b 7461 673d
0x00d0: 6173 3463 3661 3437 3233 0d0a 4361 6c6c
0x00e0: 2d49 443a 2030 3031 3264 6138 612d 6366
0x00f0: 3338 3030 3032 2d37 3539 6139 6235 372d
0x0100: 3335 3133 6533 6464 4031 3932 2e31 3638
0x0110: 2e35 302e 3138 350d 0a43 5365 713a 2031
0x0120: 3031 2052 4547 4953 5445 520d 0a53 6572
0x0130: 7665 723a 2046 5042 582d 322e 382e 3128
0x0140: 3131 2e34 2e30 290d 0a41 6c6c 6f77 3a20
0x0150: 494e 5649 5445 2c20 4143 4b2c 2043 414e
0x0160: 4345 4c2c 204f 5054 494f 4e53 2c20 4259
0x0170: 452c 2052 4546 4552 2c20 5355 4253 4352
0x0180: 4942 452c 204e 4f54 4946 592c 2049 4e46
0x0190: 4f2c 2050 5542 4c49 5348 0d0a 5375 7070
0x01a0: 6f72 7465 643a 2072 6570 6c61 6365 732c
0x01b0: 2074 696d 6572 0d0a 5757 572d 4175 7468
0x01c0: 656e 7469 6361 7465 3a20 4469 6765 7374
0x01d0: 2061 6c67 6f72 6974 686d 3d4d 4435 2c20
0x01e0: 7265 616c 6d3d 2261 7374 6572 6973 6b22
0x01f0: 2c20 6e6f 6e63 653d 2234 3430 3530 3038
0x0200: 3022 0d0a 436f 6e74 656e 742d 4c65 6e67
0x0210: 7468 3a20 300d 0a0d 0a
15:17:27.147652 IP (tos 0x0, ttl 64, id 1671, offset 0, flags [none], proto: ICMP (1), length: 56) 192.168.50.185 > 192.168.50.1: ICMP 192.168.50.185 udp port 50816 unreachable, length 36
IP (tos 0x60, ttl 64, id 20905, offset 0, flags [none], proto: UDP (17), length: 565) 192.168.50.1.sip > 192.168.50.185.50816: SIP, length: 537
a: SIP/2.0/UDP 192.168.50.1:5060;branch=z9hG4bK3f00c96c;received=192.168.50.185
From: <sip:753@192.168.50.1>;tag=0012da8acf38000250c014a7-3021fd24
To: <sip:753@192.168.50.1>;tag=as4c6a4723
Call-ID: 0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185
CSeq: 101 REGISTER
Server: FPBX-2.8.1(11.4.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="44050080"
Content-Length: 0
20
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
....
Почему телефон выдает unreach???
Вот дебаг астериска:
Код: Выделить всё
<--- SIP read from UDP:192.168.50.185:50816 --->
REGISTER sip:192.168.50.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.185:50816;branch=z9hG4bK68c3067b
From: <sip:753@192.168.50.1>;tag=0012da8acf38001d6a4b8a20-54d424c6
To: <sip:753@192.168.50.1>
Call-ID: 0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185
Max-Forwards: 70
Date: Wed, 31 Jul 2013 08:30:47 GMT
CSeq: 126 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:753@192.168.50.185:50816;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0012da8acf38>";+u.sip!model.ccm.cisco.com="8"
Content-Length: 0
Expires: 120
<------------->
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 0 [ 33]: REGISTER sip:192.168.50.1 SIP/2.0
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 1 [ 60]: Via: SIP/2.0/UDP 192.168.50.185:50816;branch=z9hG4bK68c3067b
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 2 [ 66]: From: <sip:753@192.168.50.1>;tag=0012da8acf38001d6a4b8a20-54d424c6
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 3 [ 26]: To: <sip:753@192.168.50.1>
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 4 [ 59]: Call-ID: 0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 5 [ 16]: Max-Forwards: 70
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 6 [ 35]: Date: Wed, 31 Jul 2013 08:30:47 GMT
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 7 [ 18]: CSeq: 126 REGISTER
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 8 [ 29]: User-Agent: Cisco-CP7940G/8.0
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 9 [148]: Contact: <sip:753@192.168.50.185:50816;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0012da8acf38>";+u.sip!model.ccm.cisco.com="8"
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 10 [ 17]: Content-Length: 0
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 11 [ 12]: Expires: 120
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Header 12 [ 0]:
[Jul 31 15:31:15] VERBOSE[3895] chan_sip.c: --- (12 headers 0 lines) ---
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: **** Received REGISTER (2) - Command in SIP REGISTER
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Ignoring SIP message because of retransmit (REGISTER Seqno 126, ours 126)
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Initializing initreq for method REGISTER - callid 0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185
[Jul 31 15:31:15] DEBUG[3895] netsock2.c: Splitting '192.168.50.185:50816' into...
[Jul 31 15:31:15] DEBUG[3895] netsock2.c: ...host '192.168.50.185' and port '50816'.
[Jul 31 15:31:15] VERBOSE[3895] chan_sip.c: Sending to 192.168.50.185:50816 (no NAT)
[Jul 31 15:31:15] DEBUG[3895] netsock2.c: Splitting '192.168.50.1' into...
[Jul 31 15:31:15] DEBUG[3895] netsock2.c: ...host '192.168.50.1' and port ''.
[Jul 31 15:31:15] VERBOSE[3895] chan_sip.c:
<--- Transmitting (no NAT) to 192.168.50.185:50816 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.185:50816;branch=z9hG4bK68c3067b;received=192.168.50.185
From: <sip:753@192.168.50.1>;tag=0012da8acf38001d6a4b8a20-54d424c6
To: <sip:753@192.168.50.1>;tag=as4c6a4723
Call-ID: 0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185
CSeq: 126 REGISTER
Server: FPBX-2.8.1(11.4.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="26730aab"
Content-Length: 0
<------------>
[Jul 31 15:31:15] DEBUG[3895] chan_sip.c: Trying to put 'SIP/2.0 401' onto UDP socket destined for 192.168.50.185:50816
[Jul 31 15:31:15] VERBOSE[3895] chan_sip.c: Scheduling destruction of SIP dialog '0012da8a-cf380002-759a9b57-3513e3dd@192.168.50.185' in 32000 ms (Method: REGISTER)
А как правильно делать?SIP—For SIP, the SIPDefault.cnf and SIP<mac-address>.cnf files are downloaded when a phone is reset. This file contains the image_version parameter that tells the phone which image it should be running. If the image load differs from the one that is currently loaded on the phone, the phone contacts the TFTP server to upgrade to the new image
Спасибо.