Добрый день.
Установил, настроил asterisk - подключается к rosnet'у и имеет входящие и исходящие звонки. К астериску подрубаются SIP телефоны и принимают/совершают вызовы.
Все работало нормально на исходящие и на входящие. Но после того как начал ковыряться с кодеками - перестали работать исходящие вызовы, хотя если софтфоном подрубится к роснету - все работает прекрасно.
Не подскажите - где может быть косяк?
Вот конфиги: sip.conf:
[general]
register => user:123456@6653055.phone.rosnet.ru/6653055
localnet = 192.168.1.0/255.255.255.0
externip = 87.244.7.206
externrefresh = 60
nat = no
canreinvite = no
context = 6653055-is
language=ru
defaultexpiry=600
allowguest = no
bindport = 5060
allowoverlap = no
udpbindaddr = 0.0.0.0
tcpenable = no
tcpbindaddr = 0.0.0.0
srvlookup = yes
subscribecontext = default
;allow = all
disallow = all
allow = alaw
allow = ulaw
allow = g729
allow = gsm
[sipnet]
secret = 123456
defaultuser = user
username = user
trunkname = sipnet
host = 6653055.phone.rosnet.ru
context = 6653055-is
insecure = invite
fromuser = 6653055
fromdomain = 6653055.phone.rosnet.ru
type = peer
disallow = all
allow = alaw
allow = ulaw
allow = g729
allow = gsm
nat = no
canreinvite = no
dtmfmode = info
callcounter = yes
users.conf:
[general]
fullname = New User
userbase = 6000
hasvoicemail = yes
vmsecret = 1234
hassip = yes
hasiax = yes
hasmanager = no
callwaiting = yes
threewaycalling = yes
callwaitingcallerid = yes
transfer = yes
canpark = yes
cancallforward = yes
callreturn = yes
callgroup = 1
pickupgroup = 1
[1002]
type=friend
nat = yes
canreinvite = no
hassip = yes
defaultuser = 1002
context=office-users
secret=sandello
cid_number = 1002
vmsecret=123
host=dynamic
dtmfmode=rfc2833
username=1002
disallow=all
allow=alaw
allow=ulaw
allow=g729
allow=gsm
extensions.conf:
[6653055-is]
exten => user,1,Answer
exten => user,2,Playback(privetstvie-work)
exten => user,3,Dial(SIP/1002)
exten => user,4,Hangup
[office-users]
exten => _XXXXXXXXXXX,1,Dial(SIP/${EXTEN}@sipnet,30,r)
Звонки извне проходят замечательно, а вот исходящие не идут... Вот логи, при попытке исходящего звонка:
<--- SIP read from UDP:213.108.18.100:60950 --->
INVITE sip:79671983788@87.244.7.206 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK807476705
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>
Call-ID: 527852667@10.0.2.134
CSeq: 1 INVITE
Contact: <sip:1002@10.0.2.134:5062>
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T18 18.0.14.5
Supported: replaces
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 290
v=0
o=- 20006 20006 IN IP4 10.0.2.134
s=SDP data
c=IN IP4 10.0.2.134
t=0 0
m=audio 11792 RTP/AVP 8 0 9 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
<------------->
--- (14 headers 14 lines) ---
[Kgateway*CLI>
[0KSending to 10.0.2.134 : 5062 (no NAT)
[Kgateway*CLI>
[0KUsing INVITE request as basis request - 527852667@10.0.2.134
Found peer '1002' for '1002' from 213.108.18.100:60950
<--- Reliably Transmitting (NAT) to 213.108.18.100:60950 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK807476705;received=213.108.18.100
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>;tag=as1bda2e66
Call-ID: 527852667@10.0.2.134
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="4509296c"
Content-Length: 0
<------------>
[Kgateway*CLI>
[0KScheduling destruction of SIP dialog '527852667@10.0.2.134' in 32000 ms (Method: INVITE)
[Kgateway*CLI>
[0K
<--- SIP read from UDP:213.108.18.100:60950 --->
ACK sip:79671983788@87.244.7.206 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK807476705
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>;tag=as1bda2e66
Call-ID: 527852667@10.0.2.134
CSeq: 1 ACK
Content-Length: 0
<------------->
[Kgateway*CLI>
[0K--- (7 headers 0 lines) ---
[Kgateway*CLI>
[0K
<--- SIP read from UDP:213.108.18.100:60950 --->
INVITE sip:79671983788@87.244.7.206 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK248076524
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>
Call-ID: 527852667@10.0.2.134
CSeq: 2 INVITE
Contact: <sip:1002@10.0.2.134:5062>
Authorization: Digest username="1002", realm="asterisk", nonce="4509296c", uri="sip:79671983788@87.244.7.206", response="7a447fd38d7a9c25bab04cfe42ca0dc7", algorithm=MD5
Content-Type: application/sdp
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T18 18.0.14.5
Supported: replaces
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 290
v=0
o=- 20006 20006 IN IP4 10.0.2.134
s=SDP data
c=IN IP4 10.0.2.134
t=0 0
m=audio 11792 RTP/AVP 8 0 9 18 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:9 G722/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=sendrecv
<------------->
--- (15 headers 14 lines) ---
Sending to 213.108.18.100 : 60950 (NAT)
Using INVITE request as basis request - 527852667@10.0.2.134
Found peer '1002' for '1002' from 213.108.18.100:60950
[Kgateway*CLI>
[0KFound RTP audio format 8
[Kgateway*CLI>
[0KFound RTP audio format 0
Found RTP audio format 9
Found RTP audio format 18
Found RTP audio format 101
Found audio description format PCMA for ID 8
Found audio description format PCMU for ID 0
Found audio description format G722 for ID 9
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0x110c (ulaw|alaw|g729|g722)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x10c (ulaw|alaw|g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 10.0.2.134:11792
Looking for 79671983788 in office-users (domain 87.244.7.206)
[Kgateway*CLI>
[0Klist_route: hop: <sip:1002@10.0.2.134:5062>
[Kgateway*CLI>
[0K
<--- Transmitting (NAT) to 213.108.18.100:60950 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK248076524;received=213.108.18.100
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>
Call-ID: 527852667@10.0.2.134
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:79671983788@87.244.7.206>
Content-Length: 0
<------------>
[Kgateway*CLI>
[0KAudio is at 87.244.7.206 port 19186
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding codec 0x2 (gsm) to SDP
[Kgateway*CLI>
[0KReliably Transmitting (no NAT) to 195.90.137.30:5060:
INVITE sip:79671983788@6653055.phone.rosnet.ru SIP/2.0
Via: SIP/2.0/UDP 87.244.7.206:5060;branch=z9hG4bK794bb845;rport
Max-Forwards: 70
From: "New User" <sip:6653055@6653055.phone.rosnet.ru>;tag=as182b55f4
To: <sip:79671983788@6653055.phone.rosnet.ru>
Contact: <sip:6653055@87.244.7.206>
Call-ID: 4d79ff2d5828fccb2546befa44fdee29@6653055.phone.rosnet.ru
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.20
Date: Fri, 21 Oct 2011 11:13:12 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 228
v=0
o=root 2014370682 2014370682 IN IP4 87.244.7.206
s=Asterisk PBX 1.6.2.20
c=IN IP4 87.244.7.206
t=0 0
m=audio 19186 RTP/AVP 8 0 3
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=ptime:20
a=sendrecv
---
[Kgateway*CLI>
[0K
<--- Transmitting (NAT) to 213.108.18.100:60950 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK248076524;received=213.108.18.100
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>;tag=as603a5a56
Call-ID: 527852667@10.0.2.134
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:79671983788@87.244.7.206>
Content-Length: 0
[Kgateway*CLI>
[0K
<------------>
[Kgateway*CLI>
[0K
<--- SIP read from UDP:195.90.137.30:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 87.244.7.206:5060;branch=z9hG4bK794bb845;received=87.244.7.206;rport=5060
From: "New User" <sip:6653055@6653055.phone.rosnet.ru>;tag=as182b55f4
To: <sip:79671983788@6653055.phone.rosnet.ru>;tag=8KUVKeRbYer8uhjEGUvKpmDJbsn8iAEq
Call-ID: 4d79ff2d5828fccb2546befa44fdee29@6653055.phone.rosnet.ru
CSeq: 102 INVITE
Contact: <sip:79671983788@195.90.137.30:5060>
Max-Forwards: 70
User-Agent: Svetets CallManager R12642
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, MESSAGE, PUBLISH, SUBSCRIBE, OPTIONS, INFO
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
[Kgateway*CLI>
[0K
<--- SIP read from UDP:195.90.137.30:5060 --->
SIP/2.0 603 Decline
Via: SIP/2.0/UDP 87.244.7.206:5060;branch=z9hG4bK794bb845;received=87.244.7.206;rport=5060
From: "New User" <sip:6653055@6653055.phone.rosnet.ru>;tag=as182b55f4
To: <sip:79671983788@6653055.phone.rosnet.ru>;tag=9cGY5h7SMFgutpbfCIKLFWT1RZWiKDbU
Call-ID: 4d79ff2d5828fccb2546befa44fdee29@6653055.phone.rosnet.ru
CSeq: 102 INVITE
Contact: <sip:79671983788@195.90.137.30:5060>
Max-Forwards: 70
User-Agent: Svetets CallManager R12642
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, MESSAGE, PUBLISH, SUBSCRIBE, OPTIONS, INFO
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
[Kgateway*CLI>
[0KTransmitting (no NAT) to 195.90.137.30:5060:
ACK sip:79671983788@6653055.phone.rosnet.ru SIP/2.0
Via: SIP/2.0/UDP 87.244.7.206:5060;branch=z9hG4bK794bb845;rport
Max-Forwards: 70
From: "New User" <sip:6653055@6653055.phone.rosnet.ru>;tag=as182b55f4
To: <sip:79671983788@6653055.phone.rosnet.ru>;tag=9cGY5h7SMFgutpbfCIKLFWT1RZWiKDbU
Contact: <sip:6653055@87.244.7.206>
Call-ID: 4d79ff2d5828fccb2546befa44fdee29@6653055.phone.rosnet.ru
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.2.20
Content-Length: 0
[Kgateway*CLI>
[0K
[Kgateway*CLI>
[0K
---
[Kgateway*CLI>
[0K
<--- Reliably Transmitting (NAT) to 213.108.18.100:60950 --->
SIP/2.0 486 Busy Here
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK248076524;received=213.108.18.100
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>;tag=as603a5a56
Call-ID: 527852667@10.0.2.134
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.20
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
X-Asterisk-HangupCause: Call Rejected
X-Asterisk-HangupCauseCode: 21
Content-Length: 0
<------------>
[Kgateway*CLI>
[0K
<--- SIP read from UDP:213.108.18.100:60950 --->
ACK sip:79671983788@87.244.7.206 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.134:5062;branch=z9hG4bK248076524
From: "Operator 1002" <sip:1002@87.244.7.206>;tag=1497460098
To: <sip:79671983788@87.244.7.206>;tag=as603a5a56
Call-ID: 527852667@10.0.2.134
CSeq: 2 ACK
Content-Length: 0
<------------->
[Kgateway*CLI>
[0K--- (7 headers 0 lines) ---
Really destroying SIP dialog '527852667@10.0.2.134' Method: ACK
Заранее спасибо.
Для внутренних номеров для внешнего вызова сделайте аон 6653055.
nat = yes - осознано ?
Судя по протоколу, проблема не в кодеках (хотя я бы 729 и gsm убрал из списка оставив только [au]law), а дозвоне. Так как видно -- что вызов уходит, и сперва получает RINGING, потом TRYING, потом бамс -- DECLINED. То есть не похоже на кодеки-то.
Для внутренних номеров для внешнего вызова сделайте аон 6653055.
Found peer '1002' for '1002' from 213.108.18.100:60950
<--- Reliably Transmitting (NAT) to 213.108.18.100:60950 ---> SIP/2.0 401 Unauthorized - говорит не признали тебя. логин пасс, все ок? нужный CALLERID проставляете? Запросите трейс со стороны оператора. Если с кодеками сомнения, то выставляйте allow=all на период траблошутинга.
Found peer '1002' for '1002' from 213.108.18.100:60950
<--- Reliably Transmitting (NAT) to 213.108.18.100:60950 ---> SIP/2.0 401 Unauthorized - говорит не признали тебя. логин пасс, все ок? нужный CALLERID проставляете? Запросите трейс со стороны оператора. Если с кодеками сомнения, то выставляйте allow=all на период траблошутинга.
Задан: 2011-10-21 15:15:50 +0400
Просмотрен: 2,247 раз
Обновлен: Oct 25 '11
Проект компании "АТС Дизайн"
Asterisk® и Digium® являются зарегистрированными торговыми марками компании
Digium, Inc., США.
IP АТС Asterisk распространяется под лицензией
GNU GPL.