1.Провайдер по сипу выдает телефонные номера, регистрация на сервере не требуется
172.16.240.101 gw
172.16.240.102 my
2111121 number
Моя сеть
Asterisk 11
192.168.208.0/22
192.168.208.59-интерфейс смотрящий в сторону моей сети
2. Входящие вызовы из вне работают , а исходящие нет, провайдер говорит что к ним приходят пакеты с моими внутренними номерами, хотя в другом филиале сип с регистрацией на другого провайдера конфа нормально работает
SIP.conf
Код:
Код: Выделить всё
[general]
allowguest=no
useragent=mycomp
defaultexpiry=360
callevents=yes
language=ru
tcpenable=yes
transport=udp,tcp
videosupport=yes
[ipphone](!)
type=friend
host=dynamic
secret=7777777
callgroup=1
pickupgroup=1
allow=h261
allow=h264
allow=h263
allow=h263p
allow=g729
allow=gsm
allow=alaw
allow=ulaw
[400](ipphone)
context=phones
[401](ipphone)
context=phones
[402](ipphone)
context=phones
[403](ipphone)
context=phones
[406](ipphone)
context=phones
[407](ipphone)
context=phones
[MTS]
type=friend
context=incoming
fromuser=2111121
host=172.16.240.101
default=172.16.240.101
dtmfmode=rfc2833
nat=no
disallow=all
allow=alaw
allow=g729
insecure=invite,port
fromdomain=172.16.240.101
canreinvite=no
Код: Выделить всё
Код:
[globals]
CISCO1=SIP/400
CISCO2=SIP/401
Mike=SIP/402
IVAN=SIP/403
TEST=SIP/406
GRAND=SIP/407
OUTBOUND1=SIP/MTS
[general]
[internal]
exten => 400,1,Dial(${CISCO1},10,t)
exten => 400,n,Hangup()
exten => 401,1,Dial(${CISCO2},10,t)
exten => 401,n,Hangup()
exten => 402,1,Dial(${Mike},10,t)
exten => 402,n,Hangup()
exten => 403,1,Dial(${IVAN},10,t)
exten => 403,n,Hangup()
exten => 406,1,Dial(${TEST},10,t)
exten => 406,n,Hangup()
exten => 407,1,Dial(${GRAND},10,t)
exten => 407,n,Hangup()
[out]
exten => _X.,1,Answer()
exten => _X.,n,Dial(${OUTBOUND1}/${EXTEN},30)
exten => _X.,n,Hangup()
[phones]
include => internal
include => out
[incoming]
exten => 2111121,1,Goto(internal,403,1)
Код:
Код: Выделить всё
== Using SIP VIDEO CoS mark 6
== Using SIP RTP CoS mark 5
-- Executing [89180743112@phones:1] Answer("SIP/407-0000003f", "") in new stack
> 0xb7331d78 -- Probation passed - setting RTP source address to 192.168.208.61:4038
-- Executing [89180743112@phones:2] Dial("SIP/407-0000003f", "SIP/MTS/89180743112,30") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/MTS/89180743112
-- Got SIP response 480 "No Routes Found" back from 172.16.240.101:5060
-- SIP/MTS-00000040 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing [89180743112@phones:3] Hangup("SIP/407-0000003f", "") in new stack
== Spawn extension (phones, 89180743112, 3) exited non-zero on 'SIP/407-0000003f'
Код: Выделить всё
<------------>
-- Executing [89180743112@phones:1] Answer("SIP/407-00000049", "") in new stack
Audio is at 10660
Adding codec 100004 (alaw) to SDP
Adding codec 100003 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (no NAT) to 192.168.208.61:48043 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.208.61:48043;branch=z9hG4bKPjcHUXKsPGIRlB-e3PmcID8l8iQpjmJQ5n;received=192.168.208.61;rport=48043
From: <sip:407@192.168.208.59>;tag=w-mZU1nZygjtQSY.s1Q1vQxOApbKbNd6
To: <sip:89180743112@192.168.208.59>;tag=as6bd2b4f3
Call-ID: Hz51H3ExKci8LywDnpAd1wRDmrwVEtUl
CSeq: 13380 INVITE
Server: mycomp
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:89180743112@192.168.208.59:5060>
Content-Type: application/sdp
Require: timer
Content-Length: 262
v=0
o=root 933633072 933633072 IN IP4 192.168.208.59
s=Asterisk PBX 11.10.0
c=IN IP4 192.168.208.59
t=0 0
m=audio 10660 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------>
> 0xb73433f0 -- Probation passed - setting RTP source address to 192.168.208.61:4008
-- Executing [89180743112@phones:2] Dial("SIP/407-00000049", "SIP/MTS/89180743112,30") in new stack