Код: Выделить всё
11:12:54.461753 IP (tos 0x0, ttl 64, id 15082, offset 0, flags [none], proto: ICMP (1), length: 56) 192.168.50.185 > 192.168.50.1: ICMP 192.168.50.185 udp port 50608 unreachable, length 36
Код: Выделить всё
15:12:17.040273 IP (tos 0x60, ttl 64, id 9954, offset 0, flags [none], proto: UDP (17), length: 571) 192.168.50.185.50908 > 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=z9hG4bK6d4576d8
From: <sip:753@192.168.50.1>;tag=0012da8acf380002099a3495-4d29a844
To: <sip:753@192.168.50.1>
Call-ID: 0012da8a-cf380002-75c66fd7-6b91fb83@192.168.50.185
Max-Forwards: 70
Date: Thu, 01 Aug 2013 08:12:16 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 3664 3435 3736 6438 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: 3230 3939 6133 3439 352d 3464 3239 6138
0x00a0: 3434 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 3563 3636
0x00e0: 6664 372d 3662 3931 6662 3833 4031 3932
0x00f0: 2e31 3638 2e35 302e 3138 350d 0a4d 6178
0x0100: 2d46 6f72 7761 7264 733a 2037 300d 0a44
0x0110: 6174 653a 2054 6875 2c20 3031 2041 7567
0x0120: 2032 3031 3320 3038 3a31 323a 3136 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:12:17.040904 IP (tos 0x60, ttl 64, id 54260, offset 0, flags [none], proto: UDP (17), length: 567) 192.168.50.1.sip > 192.168.50.185.50908: [udp sum ok] SIP, length: 539
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.1:5060;branch=z9hG4bK6d4576d8;received=192.168.50.185
From: <sip:753@192.168.50.1>;tag=0012da8acf380002099a3495-4d29a844
To: <sip:753@192.168.50.1>;tag=as40552fad
Call-ID: 0012da8a-cf380002-75c66fd7-6b91fb83@192.168.50.185
CSeq: 101 REGISTER
Server: FPBX-2.8.1(1.8.20.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="72406655"
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 4b36 6434 3537
0x0050: 3664 383b 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 3039
0x00a0: 3961 3334 3935 2d34 6432 3961 3834 340d
0x00b0: 0a54 6f3a 203c 7369 703a 3735 3340 3139
0x00c0: 322e 3136 382e 3530 2e31 3e3b 7461 673d
0x00d0: 6173 3430 3535 3266 6164 0d0a 4361 6c6c
0x00e0: 2d49 443a 2030 3031 3264 6138 612d 6366
0x00f0: 3338 3030 3032 2d37 3563 3636 6664 372d
0x0100: 3662 3931 6662 3833 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: 312e 382e 3230 2e31 290d 0a41 6c6c 6f77
0x0150: 3a20 494e 5649 5445 2c20 4143 4b2c 2043
0x0160: 414e 4345 4c2c 204f 5054 494f 4e53 2c20
0x0170: 4259 452c 2052 4546 4552 2c20 5355 4253
0x0180: 4352 4942 452c 204e 4f54 4946 592c 2049
0x0190: 4e46 4f2c 2050 5542 4c49 5348 0d0a 5375
0x01a0: 7070 6f72 7465 643a 2072 6570 6c61 6365
0x01b0: 732c 2074 696d 6572 0d0a 5757 572d 4175
0x01c0: 7468 656e 7469 6361 7465 3a20 4469 6765
0x01d0: 7374 2061 6c67 6f72 6974 686d 3d4d 4435
0x01e0: 2c20 7265 616c 6d3d 2261 7374 6572 6973
0x01f0: 6b22 2c20 6e6f 6e63 653d 2237 3234 3036
0x0200: 3635 3522 0d0a 436f 6e74 656e 742d 4c65
0x0210: 6e67 7468 3a20 300d 0a0d 0a
15:12:17.042989 IP (tos 0x0, ttl 64, id 9955, offset 0, flags [none], proto: ICMP (1), length: 56) 192.168.50.185 > 192.168.50.1: ICMP 192.168.50.185 udp port 50908 unreachable, length 36
IP (tos 0x60, ttl 64, id 54260, offset 0, flags [none], proto: UDP (17), length: 567) 192.168.50.1.sip > 192.168.50.185.50908: SIP, length: 539
a: SIP/2.0/UDP 192.168.50.1:5060;branch=z9hG4bK6d4576d8;received=192.168.50.185
From: <sip:753@192.168.50.1>;tag=0012da8acf380002099a3495-4d29a844
To: <sip:753@192.168.50.1>;tag=as40552fad
Call-ID: 0012da8a-cf380002-75c66fd7-6b91fb83@192.168.50.185
CSeq: 101 REGISTER
Server: FPBX-2.8.1(1.8.20.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="72406655"
Content-Length: 0
\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000
...
Код: Выделить всё
[753]
deny=0.0.0.0/0.0.0.0
secret=dmD7.f+48SFZ
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
type=friend
nat=no
port=5060
qualify=yes
callgroup=
pickupgroup=
allow=all
dial=SIP/753
mailbox=753@device
permit=192.168.50.0/255.255.255.0
callerid=device <753>
callcounter=yes
faxdetect=no
Код: Выделить всё
# NAT/Firewall Traversal
nat_enable: "0"
nat_address: ""
voip_control_port: "5060"
start_media_port: "16384"
end_media_port: "32766"
nat_received_processing: "0"
Код: Выделить всё
<--- SIP read from UDP:192.168.50.185:50908 --->
REGISTER sip:192.168.50.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.185:50908;branch=z9hG4bK0090412d
From: <sip:753@192.168.50.1>;tag=0012da8acf38000817af9c9e-1c643b8a
To: <sip:753@192.168.50.1>
Call-ID: 0012da8a-cf380002-75c66fd7-6b91fb83@192.168.50.185
Max-Forwards: 70
Date: Thu, 01 Aug 2013 08:15:28 GMT
CSeq: 107 REGISTER
User-Agent: Cisco-CP7940G/8.0
Contact: <sip:753@192.168.50.185:50908;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0012da8acf38>";+u.sip!model.ccm.cisco.com="8"
Content-Length: 0
Expires: 120
<------------->
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 0 [ 33]: REGISTER sip:192.168.50.1 SIP/2.0
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 1 [ 60]: Via: SIP/2.0/UDP 192.168.50.185:50908;branch=z9hG4bK0090412d
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 2 [ 66]: From: <sip:753@192.168.50.1>;tag=0012da8acf38000817af9c9e-1c643b8a
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 3 [ 26]: To: <sip:753@192.168.50.1>
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 4 [ 59]: Call-ID: 0012da8a-cf380002-75c66fd7-6b91fb83@192.168.50.185
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 5 [ 16]: Max-Forwards: 70
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 6 [ 35]: Date: Thu, 01 Aug 2013 08:15:28 GMT
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 7 [ 18]: CSeq: 107 REGISTER
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 8 [ 29]: User-Agent: Cisco-CP7940G/8.0
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 9 [148]: Contact: <sip:753@192.168.50.185:50908;transport=udp>;+sip.instance="<urn:uuid:00000000-0000-0000-0000-0012da8acf38>";+u.sip!model.ccm.cisco.com="8"
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 10 [ 17]: Content-Length: 0
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 11 [ 12]: Expires: 120
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Header 12 [ 0]:
[Aug 1 15:15:49] VERBOSE[3922] chan_sip.c: --- (12 headers 0 lines) ---
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: **** Received REGISTER (2) - Command in SIP REGISTER
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Ignoring SIP message because of retransmit (REGISTER Seqno 107, ours 107)
[Aug 1 15:15:49] DEBUG[3922] chan_sip.c: Initializing initreq for method REGISTER - callid 0012da8a-cf380002-75c66fd7-6b91fb83@192.168.50.185
[Aug 1 15:15:49] DEBUG[3922] netsock2.c: Splitting '192.168.50.185:50908' into...
[Aug 1 15:15:49] DEBUG[3922] netsock2.c: ...host '192.168.50.185' and port '50908'.
[Aug 1 15:15:49] VERBOSE[3922] chan_sip.c: Sending to 192.168.50.185:50908 (no NAT)
[Aug 1 15:15:49] DEBUG[3922] netsock2.c: Splitting '192.168.50.1' into...
[Aug 1 15:15:49] DEBUG[3922] netsock2.c: ...host '192.168.50.1' and port ''.
[Aug 1 15:15:49] VERBOSE[3922] chan_sip.c:
<--- Transmitting (no NAT) to 192.168.50.185:50908 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.185:50908;branch=z9hG4bK0090412d;received=192.168.50.185
From: <sip:753@192.168.50.1>;tag=0012da8acf38000817af9c9e-1c643b8a
To: <sip:753@192.168.50.1>;tag=as40552fad
Call-ID: 0012da8a-cf380002-75c66fd7-6b91fb83@192.168.50.185
CSeq: 107 REGISTER
Server: FPBX-2.8.1(1.8.20.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="57498be7"
Content-Length: 0
<------------>
Спасибо.logdog писал(а):host=dynamic - укажите тут реальный айпишник телефона, будет работать?
Код: Выделить всё
*CLI> sip show peers
136/136 10.96.232.22 D A 5060 OK (106 ms) - зарегистрированы с порта 5060 если нет НАТа
135/135 10.85.246.148 D A 5060 OK (75 ms) - зарегистрированы с порта 5060 если нет НАТа
115/115 111.89.47.201 D N A 42151 OK (99 ms) - зарегистрированы с порта абы какого если телефон за НАТом.
Код: Выделить всё
# grep voip_control_port SIPDefault.cnf
voip_control_port: "5060"
#
Код: Выделить всё
*CLI> sip show peers
136/136 10.96.232.22 D A 5060 OK (106 ms) - зарегистрированы с порта 5060 если нет НАТа
135/135 10.85.246.148 D A 5060 OK (75 ms) - зарегистрированы с порта 5060 если нет НАТа
115/115 111.89.47.201 D N A 42151 OK (99 ms) - зарегистрированы с порта абы какого если телефон за НАТом.