Asterisk 1.6.0.3, centos 5.5, нахожусь за натом
Входящие звонки проходят нормально. При попытке совершить исходящий зовнок получаю Gateway Is Invalid.
Вот уже второй день бьюсь и не могу понять кто из нас инвалид, я или провайдер...
sip.conf
Код: Выделить всё
[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
srvlookup=yes
notifymimetype=text/plain
buggymwi=yes
Код: Выделить всё
[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
[discounttelecom]
secret=blablabla
username=74954444444
trunkname=discounttelecom
callerid=
hasexten=no
hassip=yes
hasiax=no
registeriax=no
registersip=yes
qualify=yes
host=sip.discounttelecom.ru
context=office
insecure=invite
fromuser=74954444444
fromdomain=sip.discounttelecom.ru
type=peer
contact=20001
disallow=all
allow=alaw
allow=ulaw
allow=g729
nat=yes
srvlookup=yes
externrefresh=10
canreinvite=no
dtmfmode=info
defaultexpiry=60
exten => 701,20,Dial(SIP/84991111111@discounttelecom,120,rTtWw)
Код: Выделить всё
-- Executing [701@office:10] Dial("SIP/74954444444-0896b730", "SIP/84991111111@discounttelecom,120,rTtWw") in new stack
== Using SIP RTP CoS mark 5
Audio is at 10.110.5.222 port 13844
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Reliably Transmitting (NAT) to 81.94.129.162:5060:
INVITE sip:84991111111@sip.discounttelecom.ru SIP/2.0
Via: SIP/2.0/UDP 10.110.5.222:5060;branch=z9hG4bK77655808;rport
Max-Forwards: 70
From: "9032222222" <sip:74954444444@sip.discounttelecom.ru>;tag=as2e73acfa
To: <sip:84991111111@sip.discounttelecom.ru>
Contact: <sip:74954444444@10.110.5.222>
Call-ID: 1a2467950b3bc26f75a953ec504b8a63@sip.discounttelecom.ru
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.0.3
Date: Thu, 02 Jun 2011 13:40:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 231
v=0
o=root 1007547094 1007547094 IN IP4 10.110.5.222
s=Asterisk PBX 1.6.0.3
c=IN IP4 10.110.5.222
t=0 0
m=audio 13844 RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
---
-- Called 84991111111@discounttelecom
-- Stopped music on hold on SIP/74954444444-0896b730
== Begin MixMonitor Recording SIP/74954444444-0896b730
<--- SIP read from UDP://81.94.129.162:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.110.5.222:5060;branch=z9hG4bK77655808;rport=5060;received=213.108.1.11
From: "9032222222" <sip:74954444444@sip.discounttelecom.ru>;tag=as2e73acfa
To: <sip:84991111111@sip.discounttelecom.ru>
Call-ID: 1a2467950b3bc26f75a953ec504b8a63@sip.discounttelecom.ru
CSeq: 102 INVITE
Contact: <sip:84991111111@81.94.129.162:5060>
Server: MERA MVTS3G v.4.2.0-27a
Content-Length: 0
<------------->
--- (9 headers 0 lines) ---
localhost*CLI>
<--- SIP read from UDP://81.94.129.162:5060 --->
SIP/2.0 500 Gateway Is Invalid
Via: SIP/2.0/UDP 10.110.5.222:5060;branch=z9hG4bK77655808;rport=5060;received=213.108.1.11
From: "9032222222" <sip:74954444444@sip.discounttelecom.ru>;tag=as2e73acfa
To: <sip:84991111111@sip.discounttelecom.ru>;tag=582417350-3759218061-201377213-1859863337
Call-ID: 1a2467950b3bc26f75a953ec504b8a63@sip.discounttelecom.ru
CSeq: 102 INVITE
Contact: <sip:84991111111@81.94.129.162:5060>
Server: MERA MVTS3G v.4.2.0-27a
Reason: MVTSPRO;cause=40;text="Gateway Is Invalid"
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
-- Got SIP response 500 "Gateway Is Invalid" back from 81.94.129.162
Transmitting (NAT) to 81.94.129.162:5060:
ACK sip:84991111111@sip.discounttelecom.ru SIP/2.0
Via: SIP/2.0/UDP 10.110.5.222:5060;branch=z9hG4bK77655808;rport
Max-Forwards: 70
From: "9032222222" <sip:74954444444@sip.discounttelecom.ru>;tag=as2e73acfa
To: <sip:84991111111@sip.discounttelecom.ru>;tag=582417350-3759218061-201377213-1859863337
Contact: <sip:74954444444@10.110.5.222>
Call-ID: 1a2467950b3bc26f75a953ec504b8a63@sip.discounttelecom.ru
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.6.0.3
Content-Length: 0
---
<< [ TYPE: Control (4) SUBCLASS: Congestion (8) ] [SIP/discounttelecom-0894b7b0]
-- SIP/discounttelecom-0894b7b0 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [701@office:11] Hangup("SIP/74954444444-0896b730", "") in new stack
Ткните меня куда-нить носом, пожалуйста
Вот единственное что заметил, на другом сервере, с другим номером, но с тем же провайдером я в поле from вижу не 9032222222 а 89032222222
т.е. From: "89032222222" <sip:74954444444@sip.discounttelecom.ru>;tag=as2e73acfa
и звонок уходит...
Поставил x-lite, аккаунт рабочий, с исходящими всё в порядке
Получил ответ от провайдера:
Со своей стороны не видим проблемы для того что бы исходящие вызовы не ходили. Проблема в авторизации asterisk, sip-аккаунт и запрос invite не совпадают.
213.108.1.11.5060 > 81.94.129.162.5060: [udp sum ok] SIP, length: 523
OPTIONS sip:sip.discounttelecom.ru SIP/2.0
Via: SIP/2.0/UDP 10.110.5.222:5060;branch=z9hG4bK483c3052;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@10.110.5.222>;tag=as4b1d20b9
To: <sip:sip.discounttelecom.ru>
Contact: <sip:asterisk@10.110.5.222>