Автор: rakis
Дата сообщения: 31.08.2010 15:49
Дано: CCM 6.1(5), Cisco 2811 (ADVENTERPRISEK9_IVS, 12.4(24)T3)
Топология: IP Phone -> SCCP -> CCM -> SIP -> C2811 -> SIP -> ITSP
Задача: настроить SIP транк с провайдером
Вроде и задача простая, но есть несколько нюансов:
1. C2811 имеет "серый" адрес, через Static NAT анонсируется в интернет с адресом 1.1.1.1
2. Любой хост при попытке обратиться к SIP серверу провайдера транслируется также в адрес 1.1.1.1
[more=Конфиг фаервола]
! Разрешаем провайдеру приходить к нам по SIP портам
access-list outside_access_in extended permit tcp host 2.2.2.2 host 1.1.1.1 eq sip
access-list outside_access_in extended permit udp host 2.2.2.2 host 1.1.1.1 eq sip
! Разрешаем RTP
access-list outside_access_in extended permit udp host 2.2.2.2 host 1.1.1.1 range 16384 32767
static (dmz,outside) tcp 1.1.1.1 sip 172.17.0.21 sip netmask 255.255.255.255
static (dmz,outside) udp 1.1.1.1 sip 172.17.0.21 sip netmask 255.255.255.255
! Выпускаем SIP клиентов под адресом нашего SIP маршрутизатора
global (outside) 26 1.1.1.1 netmask 255.255.255.255
nat (inside) 26 access-list SIP_clients
access-list SIP_clients extended permit udp any host 2.2.2.2 range 16384 32767
[/more]
3. На C2811 настроено 8-ку заворачивать в транк
[more=Конфиг маршрутизатора]
voice service voip
media flow-around
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
fax protocol cisco
h323
sip
voice class codec 1
codec preference 1 g711alaw
codec preference 2 g711ulaw
voice class sip-profiles 10
request INVITE sip-header From modify "(<.*:.*@)(.*>)" "\11.1.1.1>"
request INVITE sip-header Contact modify "(<.*:.*@)(.*>)" "\11.1.1.1:5060>"
request INVITE sip-header Via modify "(.*UDP ).*" "\11.1.1.1:5060"
dial-peer voice 4 voip
! В ССМ
destination-pattern 5....
session protocol sipv2
session target ipv4:172.17.0.17
dial-peer voice 8 voip
! К провайдеру
destination-pattern 8T
voice-class sip profiles 10
session protocol sipv2
session target ipv4:2.2.2.2
session transport udp
codec g711alaw
[/more]
Вроде все просто. Проблема одна - не работает. При звонке минуту-две тишина, затем короткие гудки.
[more=Лог звонка]
Aug 31 12:25:52.974: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:89161111111@172.17.0.21:5060 SIP/2.0
Date: Tue, 31 Aug 2010 12:25:52 GMT
Call-Info: <sip:172.17.0.17:5060>;method="NOTIFY;Event=telephone-event;Duration=500"
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, PUBLISH
From: "SindarovskyRA" <sip:50000@172.17.0.17>;tag=d816acea-2727-4342-bb9e-5abc7815aedb-165327024
Allow-Events: presence, kpml
Supported: timer,replaces
Min-SE: 1800
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.17>;party=calling;screen=yes;privacy=off
Content-Length: 0
User-Agent: Cisco-CUCM6.1
To: <sip:89161111111@172.17.0.21>
Contact: <sip:50000@172.17.0.17:5060>
Expires: 180
Call-ID: e3b58d80-c7c1f4d0-1453b7-117c1aac@172.17.0.17
Via: SIP/2.0/UDP 172.17.0.17:5060;branch=z9hG4bK3b926712873
CSeq: 101 INVITE
Session-Expires: 1800
Max-Forwards: 70
Aug 31 12:25:52.998: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.17.0.17:5060;branch=z9hG4bK3b926712873
From: "SindarovskyRA" <sip:50000@172.17.0.17>;tag=d816acea-2727-4342-bb9e-5abc7815aedb-165327024
To: <sip:89161111111@172.17.0.21>
Date: Tue, 31 Aug 2010 12:25:52 GMT
Call-ID: e3b58d80-c7c1f4d0-1453b7-117c1aac@172.17.0.17
CSeq: 101 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-12.x
Content-Length: 0
Aug 31 12:25:52.998: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:89161111111@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5060
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.21>;party=calling;screen=yes;privacy=off
From: "SindarovskyRA" <sip:50000@1.1.1.1>;tag=13E152BC-179F
To: <sip:89161111111@2.2.2.2>
Date: Tue, 31 Aug 2010 12:25:52 GMT
Call-ID: BB1B8DA9-B43111DF-95F794CE-5B716F45@172.17.0.21
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3138945097-3023114719-2515637454-1534160709
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1283257552
Contact: <sip:50000@1.1.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Length: 0
Aug 31 12:25:53.498: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:89161111111@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5060
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.21>;party=calling;screen=yes;privacy=off
From: "SindarovskyRA" <sip:50000@1.1.1.1>;tag=13E152BC-179F
To: <sip:89161111111@2.2.2.2>
Date: Tue, 31 Aug 2010 12:25:53 GMT
Call-ID: BB1B8DA9-B43111DF-95F794CE-5B716F45@172.17.0.21
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3138945097-3023114719-2515637454-1534160709
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1283257553
Contact: <sip:50000@1.1.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Length: 0
Aug 31 12:25:54.498: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:89161111111@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5060
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.21>;party=calling;screen=yes;privacy=off
From: "SindarovskyRA" <sip:50000@1.1.1.1>;tag=13E152BC-179F
To: <sip:89161111111@2.2.2.2>
Date: Tue, 31 Aug 2010 12:25:54 GMT
Call-ID: BB1B8DA9-B43111DF-95F794CE-5B716F45@172.17.0.21
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3138945097-3023114719-2515637454-1534160709
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1283257554
Contact: <sip:50000@1.1.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Length: 0
Aug 31 12:25:56.498: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:89161111111@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5060
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.21>;party=calling;screen=yes;privacy=off
From: "SindarovskyRA" <sip:50000@1.1.1.1>;tag=13E152BC-179F
To: <sip:89161111111@2.2.2.2>
Date: Tue, 31 Aug 2010 12:25:56 GMT
Call-ID: BB1B8DA9-B43111DF-95F794CE-5B716F45@172.17.0.21
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3138945097-3023114719-2515637454-1534160709
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1283257556
Contact: <sip:50000@1.1.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Length: 0
Aug 31 12:26:00.498: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:89161111111@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5060
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.21>;party=calling;screen=yes;privacy=off
From: "SindarovskyRA" <sip:50000@1.1.1.1>;tag=13E152BC-179F
To: <sip:89161111111@2.2.2.2>
Date: Tue, 31 Aug 2010 12:26:00 GMT
Call-ID: BB1B8DA9-B43111DF-95F794CE-5B716F45@172.17.0.21
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3138945097-3023114719-2515637454-1534160709
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1283257560
Contact: <sip:50000@1.1.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Length: 0
Aug 31 12:26:08.498: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:89161111111@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5060
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.21>;party=calling;screen=yes;privacy=off
From: "SindarovskyRA" <sip:50000@1.1.1.1>;tag=13E152BC-179F
To: <sip:89161111111@2.2.2.2>
Date: Tue, 31 Aug 2010 12:26:08 GMT
Call-ID: BB1B8DA9-B43111DF-95F794CE-5B716F45@172.17.0.21
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3138945097-3023114719-2515637454-1534160709
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1283257568
Contact: <sip:50000@1.1.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Length: 0
Aug 31 12:26:24.498: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:89161111111@2.2.2.2:5060 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.1:5060
Remote-Party-ID: "SindarovskyRA" <sip:50000@172.17.0.21>;party=calling;screen=yes;privacy=off
From: "SindarovskyRA" <sip:50000@1.1.1.1>;tag=13E152BC-179F
To: <sip:89161111111@2.2.2.2>
Date: Tue, 31 Aug 2010 12:26:24 GMT
Call-ID: BB1B8DA9-B43111DF-95F794CE-5B716F45@172.17.0.21
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 3138945097-3023114719-2515637454-1534160709
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1283257584
Contact: <sip:50000@1.1.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 69
Session-Expires: 1800
Content-Length: 0
Aug 31 12:26:56.499: //5518/BB18804995F1/SIP/Error/act_sentinvite_wait_100: Out of retries
Aug 31 12:26:56.499: //-1/xxxxxxxxxxxx/SIP/Error/sipSPIGetContentQSIG: No Inbound Container Created !!!
Aug 31 12:26:56.499: //-1/xxxxxxxxxxxx/SIP/Error/sipSPIGetContentQ931: No Inbound Container Created !!!
Aug 31 12:26:56.499: //5518/BB18804995F1/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x4A49736C
State of The Call : STATE_DEAD
TCP Sockets Used : NO
Calling Number : 50000
Called Number : 89161111111
Source IP Address (Sig ): 172.17.0.21
Destn SIP Req Addr:Port : 2.2.2.2:5060
Destn SIP Resp Addr:Port : 2.2.2.2:5060
Destination Name : 2.2.2.2
Aug 31 12:26:56.499: //5518/BB18804995F1/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC) : 102
Disconnect Cause (SIP) : 200
Aug 31 12:26:56.507: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 408 Request Timeout
Via: SIP/2.0/UDP 172.17.0.17:5060;branch=z9hG4bK3b926712873
From: "SindarovskyRA" <sip:50000@172.17.0.17>;tag=d816acea-2727-4342-bb9e-5abc7815aedb-165327024
To: <sip:89161111111@172.17.0.21>;tag=13E24AD0-913
Date: Tue, 31 Aug 2010 12:25:52 GMT
Call-ID: e3b58d80-c7c1f4d0-1453b7-117c1aac@172.17.0.17
CSeq: 101 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-12.x
Reason: Q.850;cause=102
Content-Length: 0
Aug 31 12:26:56.507: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
ACK sip:89161111111@172.17.0.21:5060 SIP/2.0
Date: Tue, 31 Aug 2010 12:25:52 GMT
From: "SindarovskyRA" <sip:50000@172.17.0.17>;tag=d816acea-2727-4342-bb9e-5abc7815aedb-165327024
Allow-Events: presence, kpml
Content-Length: 0
To: <sip:89161111111@172.17.0.21>;tag=13E24AD0-913
Call-ID: e3b58d80-c7c1f4d0-1453b7-117c1aac@172.17.0.17
Via: SIP/2.0/UDP 172.17.0.17:5060;branch=z9hG4bK3b926712873
CSeq: 101 ACK
Max-Forwards: 70
Aug 31 12:26:56.511: //5517/BB18804995F1/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x47FF19CC
State of The Call : STATE_DEAD
TCP Sockets Used : NO
Calling Number : 50000
Called Number : 89161111111
Source IP Address (Sig ): 172.17.0.21
Destn SIP Req Addr:Port : 172.17.0.17:5060
Destn SIP Resp Addr:Port : 172.17.0.17:5060
Destination Name : 172.17.0.17
Aug 31 12:26:56.515: //5517/BB18804995F1/SIP/Call/sipSPIMediaCallInfo:
Number of Media Streams: 1
Media Stream : 1
Negotiated Codec : No Codec
Negotiated Codec Bytes : 0
Nego. Codec payload : 255 (tx), 255 (rx)
Negotiated Dtmf-relay : 0
Dtmf-relay Payload : 0 (tx), 0 (rx)
Source IP Address (Media): 172.17.0.21
Source IP Port (Media): 0
Destn IP Address (Media): -
Destn IP Port (Media): 0
Orig Destn IP Address:Port (Media): [ - ]:0
Aug 31 12:26:56.515: //5517/BB18804995F1/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC) : 102
Disconnect Cause (SIP) : 408
[/more]
[more=Ошибка] Aug 31 12:26:56.499: //5518/BB18804995F1/SIP/Error/act_sentinvite_wait_100: Out of retries
Aug 31 12:26:56.499: //-1/xxxxxxxxxxxx/SIP/Error/sipSPIGetContentQSIG: No Inbound Container Created !!!
Aug 31 12:26:56.499: //-1/xxxxxxxxxxxx/SIP/Error/sipSPIGetContentQ931: No Inbound Container Created !!! [/more] в логе есть, но как ее исправить пока не знаю.
Вопрос простой - что я не доделал?
P.S. Печаль в том, что если заменить C2811 на Asterisk, то все отлично работает.
[more=Конфиг Asterisk'а]
[general]
useragent=IP PBX
context=default
allowguest=no
allowoverlap=no
udpbindaddr=0.0.0.0
bindport=5060
tcpenable=no
tlsenable=no
srvlookup=no
videosupport=no
qualify=yes
disallow=all
allow=alaw
allow=ulaw
dtmfmode=info
externip=1.1.1.1
localnet=172.17.0.0/255.255.0.0
[ITSP]
type=friend
context=main
host=2.2.2.2
nat=yes
canreinvite=yes
transport=udp
qualify=no
[/more]