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

Cisco и аутентификация

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

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

vlrk
Сообщения: 22
Зарегистрирован: 30 ноя 2010, 14:41

Re: Cisco и аутентификация

Сообщение vlrk »

ded, спасибо!
У нас это дело для тестирования, чтобы понять что такое Asterisk, поэтому и открыли 3 тайм-слота.
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Cisco и аутентификация

Сообщение ded »

Дык, эта, меня штоле тестируете? И што, прошёл я тест?
vlrk
Сообщения: 22
Зарегистрирован: 30 ноя 2010, 14:41

Re: Cisco и аутентификация

Сообщение vlrk »

ded, здравствуйте!
Вот что сообщает asterisk на попытки позвонить на него с местной АТС.
Как понимаю, наша АТС - unknown peer. Где грабли?
localasrt*CLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [3951@from-sip-external:1] NoOp("SIP/10.10.37.10-00000001", "Received incoming SIP connection from unknown peer to 3951") in new stack
-- Executing [3951@from-sip-external:2] Set("SIP/10.10.37.10-00000001", "DID=3951") in new stack
-- Executing [3951@from-sip-external:3] Goto("SIP/10.10.37.10-00000001", "s,1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("SIP/10.10.37.10-00000001", "0?checklang:noanonymous") in new stack
-- Goto (from-sip-external,s,5)
-- Executing [s@from-sip-external:5] Set("SIP/10.10.37.10-00000001", "TIMEOUT(absolute)=15") in new stack
Channel will hangup at 2010-12-09 09:28:27.828 MSK.
-- Executing [s@from-sip-external:6] Answer("SIP/10.10.37.10-00000001", "") in new stack
-- Executing [s@from-sip-external:7] Wait("SIP/10.10.37.10-00000001", "2") in new stack
-- Executing [s@from-sip-external:8] Playback("SIP/10.10.37.10-00000001", "ss-noservice") in new stack
-- <SIP/10.10.37.10-00000001> Playing 'ss-noservice.ulaw' (language 'en')
-- Executing [s@from-sip-external:9] PlayTones("SIP/10.10.37.10-00000001", "congestion") in new stack
-- Executing [s@from-sip-external:10] Congestion("SIP/10.10.37.10-00000001", "5") in new stack
== Spawn extension (from-sip-external, s, 10) exited non-zero on 'SIP/10.10.37.10-00000001'
-- Executing [h@from-sip-external:1] Hangup("SIP/10.10.37.10-00000001", "") in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on 'SIP/10.10.37.10-00000001'
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Cisco и аутентификация

Сообщение ded »

А есть ли такой SIP пир со статическим 10.10.37.10? Обозреваемый через sip show peers?
vlrk
Сообщения: 22
Зарегистрирован: 30 ноя 2010, 14:41

Re: Cisco и аутентификация

Сообщение vlrk »

ded писал(а):А есть ли такой SIP пир со статическим 10.10.37.10? Обозреваемый через sip show peers?
localasrt*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
3950 (Unspecified) D N A 5060 UNKNOWN
3951/3951 10.40.45.129 D N A 47374 OK (5 ms)
3952 (Unspecified) D N A 5060 UNKNOWN
3955 (Unspecified) D N A 5060 UNKNOWN
cisco 10.10.37.10 N A 5060 OK (19 ms)
5 sip peers [Monitored: 2 online, 3 offline Unmonitored: 0 online, 0 offline]
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Cisco и аутентификация

Сообщение ded »

ded писал(а):На пире CUCM7 в Астериске (или какой там у вас) добавить
context=from-internal (или какой там у вас) если вызов прямо на внутренний номер, или
context=from-trunk если вызов по DID снаружи
vlrk
Сообщения: 22
Зарегистрирован: 30 ноя 2010, 14:41

Re: Cisco и аутентификация

Сообщение vlrk »

ded, вот что у нас прописано в peer -
type=peer
dtmfmode=rfc2833
context=from-trunk
host=10.10.37.10
disallow=all
allow=ulaw&alaw
nat=yes
insecure=invite
canreinvite=no
deny=0.0.0.0/0
permit=0.0.0.0/0
qualify=yes
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Cisco и аутентификация

Сообщение ded »

Если говорит "Received incoming SIP connection from unknown peer to 3951") то входящий вызов не сопоставлен с пиром cisco 10.10.37.10 N A
Почему? Надо смотреть в /var/log/asterisk/full - там подробней описан процесс входящего соединения.
А если не поможет- включать sip set debug ip 10.10.37.10
vlrk
Сообщения: 22
Зарегистрирован: 30 ноя 2010, 14:41

Re: Cisco и аутентификация

Сообщение vlrk »

ded, здравствуйте!
Вот что ответил Астериск на sip set debug ip 10.10.37.10:
(NNNNNN8202 - это №, с которого звонил, цифры убрал; 10.50.110.80 - IP астериска)

Reliably Transmitting (NAT) to 10.10.37.10:5060:
OPTIONS sip:10.10.37.10 SIP/2.0
Via: SIP/2.0/UDP 10.50.110.80:5060;branch=z9hG4bK6bb8a8b0;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@10.50.110.80>;tag=as6b12141d
To: <sip:10.10.37.10>
Contact: <sip:Unknown@10.50.110.80>
Call-ID: 2411f8333403eb4677e1220801875b95@10.50.110.80
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.14
Date: Mon, 13 Dec 2010 01:20:56 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

---
Reliably Transmitting (NAT) to 10.10.37.10:5060:
OPTIONS sip:10.10.37.10 SIP/2.0
Via: SIP/2.0/UDP 10.50.110.80:5060;branch=z9hG4bK212e9f73;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@10.50.110.80>;tag=as67fd1274
To: <sip:10.10.37.10>
Contact: <sip:Unknown@10.50.110.80>
Call-ID: 1343e4262edd636276dfd31d4b0637e5@10.50.110.80
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.14
Date: Mon, 13 Dec 2010 01:20:56 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0

---

<--- SIP read from UDP:10.10.37.10:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.50.110.80:5060;branch=z9hG4bK6bb8a8b0;rport
From: "Unknown" <sip:Unknown@10.50.110.80>;tag=as6b12141d
To: <sip:10.10.37.10>;tag=5E18C384-E77
Date: Fri, 07 May 1993 23:34:08 GMT
Call-ID: 2411f8333403eb4677e1220801875b95@10.50.110.80
Server: Cisco-SIPGateway/IOS-12.x
Content-Type: application/sdp
CSeq: 102 OPTIONS
Supported: 100rel
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO
Accept: application/sdp
Allow-Events: telephone-event
Content-Length: 164

v=0
o=CiscoSystemsSIP-GW-UserAgent 9288 9269 IN IP4 10.10.37.10
s=SIP Call
c=IN IP4 10.10.37.10
t=0 0
m=audio 0 RTP/AVP 18 0 8 4 2 15 3
c=IN IP4 10.10.37.10

<------------->
--- (14 headers 7 lines) ---
Really destroying SIP dialog '2411f8333403eb4677e1220801875b95@10.50.110.80' Method: OPTIONS

<--- SIP read from UDP:10.10.37.10:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.50.110.80:5060;branch=z9hG4bK212e9f73;rport
From: "Unknown" <sip:Unknown@10.50.110.80>;tag=as67fd1274
To: <sip:10.10.37.10>;tag=5E18C394-19D7
Date: Fri, 07 May 1993 23:34:08 GMT
Call-ID: 1343e4262edd636276dfd31d4b0637e5@10.50.110.80
Server: Cisco-SIPGateway/IOS-12.x
Content-Type: application/sdp
CSeq: 102 OPTIONS
Supported: 100rel
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO
Accept: application/sdp
Allow-Events: telephone-event
Content-Length: 164

v=0
o=CiscoSystemsSIP-GW-UserAgent 6270 9786 IN IP4 10.10.37.10
s=SIP Call
c=IN IP4 10.10.37.10
t=0 0
m=audio 0 RTP/AVP 18 0 8 4 2 15 3
c=IN IP4 10.10.37.10

<------------->
--- (14 headers 7 lines) ---
Really destroying SIP dialog '1343e4262edd636276dfd31d4b0637e5@10.50.110.80' Method: OPTIONS

<--- SIP read from UDP:10.10.37.10:56507 --->
INVITE sip:3951@10.50.110.80:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.37.10:5060
From: "EXT 8202" <sip:NNNNNN8202@10.10.37.10>;tag=5E18E534-D22
To: <sip:3951@10.50.110.80>
Date: Fri, 07 May 1993 23:34:16 GMT
Call-ID: 34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10
Supported: timer,100rel
Min-SE: 1800
Cisco-Guid: 871937776-1247416780-2927943315-4294256679
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO
CSeq: 101 INVITE
Max-Forwards: 6
Remote-Party-ID: <sip:NNNNNN8202@10.10.37.10>;party=calling;screen=no;privacy=off
Timestamp: 736817656
Contact: <sip:XXXXXX8202@10.10.37.10:5060>
Expires: 180
Allow-Events: telephone-event
Content-Type: application/sdp
Content-Length: 187

v=0
o=CiscoSystemsSIP-GW-UserAgent 780 8090 IN IP4 10.10.37.10
s=SIP Call
c=IN IP4 10.10.37.10
t=0 0
m=audio 17640 RTP/AVP 0
c=IN IP4 10.10.37.10
a=rtpmap:0 PCMU/8000
a=ptime:20

<------------->
--- (20 headers 9 lines) ---
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Sending to 10.10.37.10 : 56507 (NAT)
Using INVITE request as basis request - 34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10
No matching peer for 'NNNNNN8202' from '10.10.37.10:56507'
Found RTP audio format 0
Found audio description format PCMU for ID 0
Capabilities: us - 0xe (gsm|ulaw|alaw), peer - audio=0x4 (ulaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x0 (nothing), combined - 0x0 (nothing)
Peer audio RTP is at port 10.10.37.10:17640
Looking for 3951 in from-sip-external (domain 10.50.110.80)
list_route: hop: <sip:NNNNNN8202@10.10.37.10:5060>

<--- Transmitting (NAT) to 10.10.37.10:56507 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.10.37.10:5060;received=10.10.37.10
From: "EXT 8202" <sip:NNNNNN8202@10.10.37.10>;tag=5E18E534-D22
To: <sip:3951@10.50.110.80>
Call-ID: 34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10
CSeq: 101 INVITE
Server: Asterisk PBX 1.6.2.14
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:3951@10.50.110.80>
Content-Length: 0

<------------>
-- Executing [3951@from-sip-external:1] NoOp("SIP/10.10.37.10-00000042", "Received incoming SIP connection from unknown peer to 3951") in new stack
-- Executing [3951@from-sip-external:2] Set("SIP/10.10.37.10-00000042", "DID=3951") in new stack
-- Executing [3951@from-sip-external:3] Goto("SIP/10.10.37.10-00000042", "s,1") in new stack
-- Goto (from-sip-external,s,1)
-- Executing [s@from-sip-external:1] GotoIf("SIP/10.10.37.10-00000042", "0?checklang:noanonymous") in new stack
-- Goto (from-sip-external,s,5)
-- Executing [s@from-sip-external:5] Set("SIP/10.10.37.10-00000042", "TIMEOUT(absolute)=15") in new stack
Channel will hangup at 2010-12-13 04:21:19.810 MSK.
-- Executing [s@from-sip-external:6] Answer("SIP/10.10.37.10-00000042", "") in new stack
Audio is at 10.50.110.80 port 16856
Adding codec 0x4 (ulaw) to SDP

<--- Reliably Transmitting (NAT) to 10.10.37.10:56507 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.10.37.10:5060;received=10.10.37.10
From: "EXT 8202" <sip:NNNNNN8202@10.10.37.10>;tag=5E18E534-D22
To: <sip:3951@10.50.110.80>;tag=as07d5f3a1
Call-ID: 34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10
CSeq: 101 INVITE
Server: Asterisk PBX 1.6.2.14
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:3951@10.50.110.80>
Content-Type: application/sdp
Content-Length: 181

v=0
o=root 1006697752 1006697752 IN IP4 10.50.110.80
s=Asterisk PBX 1.6.2.14
c=IN IP4 10.50.110.80
t=0 0
m=audio 16856 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=ptime:20
a=sendrecv

<------------>

<--- SIP read from UDP:10.10.37.10:57538 --->
ACK sip:3951@10.50.110.80:5060 SIP/2.0
Via: SIP/2.0/UDP 10.10.37.10:5060
From: "EXT 8202" <sip:NNNNNN8202@10.10.37.10>;tag=5E18E534-D22
To: <sip:3951@10.50.110.80>;tag=as07d5f3a1
Date: Fri, 07 May 1993 23:34:16 GMT
Call-ID: 34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10
Max-Forwards: 6
Content-Length: 0
CSeq: 101 ACK

<------------->
--- (9 headers 0 lines) ---
-- Executing [s@from-sip-external:7] Wait("SIP/10.10.37.10-00000042", "2") in new stack
-- Executing [s@from-sip-external:8] Playback("SIP/10.10.37.10-00000042", "ss-noservice") in new stack
-- <SIP/10.10.37.10-00000042> Playing 'ss-noservice.ulaw' (language 'en')
-- Executing [s@from-sip-external:9] PlayTones("SIP/10.10.37.10-00000042", "congestion") in new stack
-- Executing [s@from-sip-external:10] Congestion("SIP/10.10.37.10-00000042", "5") in new stack
== Spawn extension (from-sip-external, s, 10) exited non-zero on 'SIP/10.10.37.10-00000042'
-- Executing [h@from-sip-external:1] Hangup("SIP/10.10.37.10-00000042", "") in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on 'SIP/10.10.37.10-00000042'
Scheduling destruction of SIP dialog '34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10' in 32000 ms (Method: ACK)
set_destination: Parsing <sip:NNNNNN8202@10.10.37.10:5060> for address/port to send to
set_destination: set destination to 10.10.37.10, port 5060
Reliably Transmitting (NAT) to 10.10.37.10:57538:
BYE sip:NNNNNN8202@10.10.37.10:5060 SIP/2.0
Via: SIP/2.0/UDP 10.50.110.80:5060;branch=z9hG4bK770edd0c;rport
Max-Forwards: 70
From: <sip:3951@10.50.110.80>;tag=as07d5f3a1
To: "EXT 8202" <sip:NNNNNN8202@10.10.37.10>;tag=5E18E534-D22
Call-ID: 34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10
CSeq: 102 BYE
User-Agent: Asterisk PBX 1.6.2.14
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0

---

<--- SIP read from UDP:10.10.37.10:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.50.110.80:5060;branch=z9hG4bK770edd0c;rport
From: <sip:3951@10.50.110.80>;tag=as07d5f3a1
To: "EXT 8202" <sip:NNNNNN8202@10.10.37.10>;tag=5E18E534-D22
Date: Fri, 07 May 1993 23:34:29 GMT
Call-ID: 34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10
Server: Cisco-SIPGateway/IOS-12.x
Content-Length: 0
CSeq: 102 BYE

<------------->
--- (9 headers 0 lines) ---
SIP Response message for INCOMING dialog BYE arrived
Really destroying SIP dialog '34058801-4A5A11CC-AE87DE93-FFF52827@10.10.37.10' Method: ACK
localasrt*CLI>
ded
Сообщения: 15625
Зарегистрирован: 26 авг 2010, 19:00

Re: Cisco и аутентификация

Сообщение ded »

У вас INVITE прибегает не с ожидаемого порта 5060:
No matching peer for 'NNNNNN8202' from '10.10.37.10:56507'

В установках транка на Астериске, для ССМ в пире указать
insecure=port,invite
Ответить
© 2008 — 2024 Asterisk.ru
Digium, Asterisk and AsteriskNOW are registered trademarks of Digium, Inc.
Design and development by PostMet-Netzwerk GmbH