Re: Cisco AS5350 и Asterisk 1.2
======== AS5350 ===========================
dial-peer voice 387499 pots
destination-pattern 9T
incoming called-number 387499
port 3/1:D
forward-digits all
!
dial-peer voice 122 voip
destination-pattern 2..
voice-class codec 1
session protocol sipv2
session target ipv4:192.168.1.1
!
dial-peer voice 121 voip
destination-pattern 1...
voice-class codec 1
session protocol sipv2
session target ipv4:192.168.1.1
=================================
============start sip.conf ===========
[AS5350]
canreinvite=no
type=friend
host=192.168.1.2
context=office
allow=gsm
allow=ulaw
allow=alaw
[202]
type=friend
host=dynamic
username=202
secret=secret
nat=no
canreinvite=yes
context=office
callerid="User202" <202>
allow=gsm
allow=ulaw
allow=alaw
allow=g723.1
allow=g729
============end sip.conf ===========
============start extensions.conf ===========
[office]
include => demo
exten => 202,1, Macro(stdexten,202,SIP/202)
exten => User202, 1, Goto (202|1)
exten => _9ZXXXXX,1,Dial(SIP/AS5350/${EXTEN},25,tT)
============end extensions.conf===============
звонию с города на cisco. отвечает. набираю 1000 (этот пример из контекста demo) и любезно слушаю барышню. Все ок.
Набираю 202
*CLI> sip debug peer AS5350
SIP Debugging Enabled for IP: 192.168.1.2:5060
Sending to 192.168.1.2 : 5060 (non-NAT)
Found RTP audio format 4
Found RTP audio format 18
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 19
Peer audio RTP is at port 192.168.1.2:16890
*CLI> sip debug peer AS5350
Found description format G729
Found description format PCMA
Found description format PCMU
Found description format CN
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x10d (g723|ulaw|a
law|g729)/video=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x2 (CN), combined - 0x0 (nothing)
Looking for 202 in default
Reliably Transmitting (no NAT) to 192.168.1.2:5060:
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.1.2:5060;branch=z9hG4bKC81EC0
From: <sip:9128400921@192.168.1.2>;tag=A9957CC-21C9
To: <sip:202@192.168.1.1>;tag=as7346b412
Call-ID: 3D4266F9-C0B311D3-81ADDB45-AD719A26@85.192.187.253
CSeq: 101 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: <sip:202@192.168.1.1>
Content-Length: 0
---------
и естесно отбой :(
коннект софтовым телефоном к * и звонок в город через 9
We're at 192.168.1.1 port 16772
Answering/Requesting with root capability 0x2 (gsm)
Answering with capability 0x4 (ulaw)
Answering with capability 0x8 (alaw)
Answering with non-codec capability 0x1 (telephone-event)
12 headers, 12 lines
Reliably Transmitting (no NAT) to 85.192.187.253:5060:
INVITE sip:9960091@85.192.187.253 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:5060;branch=z9hG4bK55d3374a
From: "User202" <sip:202@192.168.1.1>;tag=as5e0f996e
To: <sip:9960091@85.192.187.253>
Contact: <sip:202@192.168.1.1>
Call-ID: 69bd6846278eea072b91f7346cb0495d@192.168.1.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Fri, 28 Oct 2005 06:44:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 261
v=0
o=root 74662 74662 IN IP4 192.168.1.1
s=session
v=0
t=0 0
m=audio 16772 RTP/AVP 3 0 8 101
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
---
Transmitting (no NAT) to 85.192.187.253:5060:
ACK sip:9960091@85.192.187.253 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.1:5060;branch=z9hG4bK55d3374a
From: "User202" <sip:202@192.168.1.1>;tag=as5e0f996e
To: <sip:9960091@85.192.187.253>;tag=A9E1834-6E6
Contact: <sip:202@192.168.1.1>
Call-ID: 69bd6846278eea072b91f7346cb0495d@192.168.1.1
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0
---
Destroying call '69bd6846278eea072b91f7346cb0495d@192.168.1.1'
телефон софтовый говорит что "Service Unavailable. Call rejected: 503 Service Unavailable"
спустя 3-5 сек на цИске в отладке появляется следующее
-------------------------
Jan 3 01:29:59.639: //219/2086F03C81B0/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x658D8410
State of The Call : STATE_DEAD
TCP Sockets Used : NO
Calling Number : 202
Called Number : 9960091
Source IP Address (Sig ): 192.168.1.2
Destn SIP Req Addr:Port : 192.168.1.1:5060
Destn SIP Resp Addr:Port : 192.168.1.1:5060
Destination Name : 192.168.1.1
AccessServer#
*Jan 3 01:29:59.639: //219/2086F03C81B0/SIP/Call/sipSPIMediaCallInfo:
Number of Media Streams: 1
Media Stream : 1
Negotiated Codec : g711ulaw
Negotiated Codec Bytes : 160
Negotiated Dtmf-relay : 0
Dtmf-relay Payload : 0
Source IP Address (Media): 192.168.1.2
Source IP Port (Media): 18046
Destn IP Address (Media): 192.168.1.1
Destn IP Port (Media): 16570
Orig Destn IP Address:Port (Media): 0.0.0.0:0
*Jan 3 01:29:59.639: //219/2086F03C81B0/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC) : 63
Disconnect Cause (SIP) : 500
------------------------------------------
НИХРЕНА не понимаю :wacko: почему вызовы не идут. с 1000 из примера нормально общаюсь :(
|