ошибка осталась. вот дебаг.
Код: Выделить всё
Reliably Transmitting (NAT) to 192.168.0.101:60680:
OPTIONS sip:1000@192.168.0.101:60680;rinstance=67c641341740c265 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.103:5060;branch=z9hG4bK6bca05cb;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@192.168.0.103>;tag=as165c3ec0
To: <sip:1000@192.168.0.101:60680;rinstance=67c641341740c265>
Contact: <sip:asterisk@192.168.0.103>
Call-ID: 282803db30e914db78c711325b016a69@192.168.0.103
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.6.2.9-2+squeeze2
Date: Wed, 25 May 2011 08:01:10 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
---
<--- SIP read from UDP:192.168.0.101:60680 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.0.103:5060;branch=z9hG4bK6bca05cb;rport=5060
Contact: <sip:192.168.0.101:60680>
To: <sip:1000@192.168.0.101:60680;rinstance=67c641341740c265>;tag=ac7f654a
From: "asterisk"<sip:asterisk@192.168.0.103>;tag=as165c3ec0
Call-ID: 282803db30e914db78c711325b016a69@192.168.0.103
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Really destroying SIP dialog '282803db30e914db78c711325b016a69@192.168.0.103' Method: OPTIONS
<--- SIP read from UDP:192.168.0.101:60680 --->
<------------->
[May 25 12:01:26] NOTICE[3094]: chan_sip.c:11655 sip_reregister: -- Re-registration for 74959845383@sip.discounttelecom.ru
[May 25 12:01:27] NOTICE[3094]: chan_sip.c:18397 handle_response_register: Outbound Registration: Expiry for sip.discounttelecom.ru is 120 sec (Scheduling reregistration in 105 s)
<--- SIP read from UDP:192.168.0.101:60680 --->
<------------->
gw*CLI>
Disconnected from Asterisk server
root@gw:~# asterisk -r
Asterisk 1.6.2.9-2+squeeze2, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.9-2+squeeze2 currently running on gw (pid = 3082)
gw*CLI> sip set debug peer 1000
SIP Debugging Enabled for IP: 192.168.0.101:60680
<--- SIP read from UDP:192.168.0.101:60680 --->
<------------->
<--- SIP read from UDP:192.168.0.101:60680 --->
INVITE sip:979015582351@192.168.0.103 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:60680;branch=z9hG4bK-d8754z-ba3dd6437b47ec2a-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:1000@192.168.0.101:60680>
To: <sip:979015582351@192.168.0.103>
From: <sip:1000@192.168.0.103>;tag=730852f3
Call-ID: YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Content-Length: 410
v=0
o=- 12950787732535156 1 IN IP4 192.168.0.101
s=CounterPath X-Lite 4.0
c=IN IP4 192.168.0.101
t=0 0
a=ice-ufrag:585e2d
a=ice-pwd:0e3d600e4d118fb06c0ecd52dae21f12
m=audio 50126 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 192.168.0.101 50126 typ host
a=candidate:1 2 UDP 659134 192.168.0.101 50127 typ host
<------------->
--- (13 headers 14 lines) ---
Sending to 192.168.0.101 : 60680 (no NAT)
Using INVITE request as basis request - YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
Found peer '1000' for '1000' from 192.168.0.101:60680
<--- Reliably Transmitting (NAT) to 192.168.0.101:60680 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.101:60680;branch=z9hG4bK-d8754z-ba3dd6437b47ec2a-1---d8754z-;received=192.168.0.101;rport=60680
From: <sip:1000@192.168.0.103>;tag=730852f3
To: <sip:979015582351@192.168.0.103>;tag=as2d354702
Call-ID: YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
CSeq: 1 INVITE
Server: Asterisk PBX 1.6.2.9-2+squeeze2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="McConfig VoIP Server", nonce="466f20ef"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.' in 6400 ms (Method: INVITE)
<--- SIP read from UDP:192.168.0.101:60680 --->
ACK sip:979015582351@192.168.0.103 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:60680;branch=z9hG4bK-d8754z-ba3dd6437b47ec2a-1---d8754z-;rport
Max-Forwards: 70
To: <sip:979015582351@192.168.0.103>;tag=as2d354702
From: <sip:1000@192.168.0.103>;tag=730852f3
Call-ID: YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
CSeq: 1 ACK
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:192.168.0.101:60680 --->
INVITE sip:979015582351@192.168.0.103 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:60680;branch=z9hG4bK-d8754z-169f9beb1e0b560f-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:1000@192.168.0.101:60680>
To: <sip:979015582351@192.168.0.103>
From: <sip:1000@192.168.0.103>;tag=730852f3
Call-ID: YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite 4 release 4.0 stamp 58832
Authorization: Digest username="1000",realm="McConfig VoIP Server",nonce="466f20ef",uri="sip:979015582351@192.168.0.103",response="bad1b5475b9b7438d7595442a29af3fe",algorithm=MD5
Content-Length: 410
v=0
o=- 12950787732535156 1 IN IP4 192.168.0.101
s=CounterPath X-Lite 4.0
c=IN IP4 192.168.0.101
t=0 0
a=ice-ufrag:585e2d
a=ice-pwd:0e3d600e4d118fb06c0ecd52dae21f12
m=audio 50126 RTP/AVP 107 0 8 101
a=rtpmap:107 BV32/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=candidate:1 1 UDP 659136 192.168.0.101 50126 typ host
a=candidate:1 2 UDP 659134 192.168.0.101 50127 typ host
<------------->
--- (14 headers 14 lines) ---
Sending to 192.168.0.101 : 60680 (NAT)
Using INVITE request as basis request - YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
Found peer '1000' for '1000' from 192.168.0.101:60680
Found RTP audio format 107
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format BV32 for ID 107
Found audio description format telephone-event for ID 101
Capabilities: us - 0xc7fffff (g723|gsm|ulaw|alaw|g726|adpcm|slin|lpc10|g729|speex|ilbc|g726aal2|g722|slin16|jpeg|png|h261|h263|h263p|h264|mpeg4|red|t140|siren7|siren14), peer - audio=0xc (ulaw|alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xc (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 192.168.0.101:50126
Looking for 979015582351 in LocalAndPSTNAndMobileAndLD (domain 192.168.0.103)
list_route: hop: <sip:1000@192.168.0.101:60680>
<--- Transmitting (NAT) to 192.168.0.101:60680 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.101:60680;branch=z9hG4bK-d8754z-169f9beb1e0b560f-1---d8754z-;received=192.168.0.101;rport=60680
From: <sip:1000@192.168.0.103>;tag=730852f3
To: <sip:979015582351@192.168.0.103>
Call-ID: YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.9-2+squeeze2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Contact: <sip:979015582351@192.168.0.103>
Content-Length: 0
<------------>
<--- Reliably Transmitting (NAT) to 192.168.0.101:60680 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 192.168.0.101:60680;branch=z9hG4bK-d8754z-169f9beb1e0b560f-1---d8754z-;received=192.168.0.101;rport=60680
From: <sip:1000@192.168.0.103>;tag=730852f3
To: <sip:979015582351@192.168.0.103>;tag=as050577c7
Call-ID: YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
CSeq: 2 INVITE
Server: Asterisk PBX 1.6.2.9-2+squeeze2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0
X-Asterisk-HangupCause: Network out of order
X-Asterisk-HangupCauseCode: 38
<------------>
<--- SIP read from UDP:192.168.0.101:60680 --->
ACK sip:979015582351@192.168.0.103 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.101:60680;branch=z9hG4bK-d8754z-169f9beb1e0b560f-1---d8754z-;rport
Max-Forwards: 70
To: <sip:979015582351@192.168.0.103>;tag=as050577c7
From: <sip:1000@192.168.0.103>;tag=730852f3
Call-ID: YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.
CSeq: 2 ACK
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog 'YzgyYTZjNTM5ZjE5ZGQ3MjhjZDc3YjI2MWYzNTIxZDM.' Method: ACK
sip.confКод: Выделить всё
[general]
register = 74959845383:sip.discounttelecom.ru
bindport = 5060
bindaddr = 0.0.0.0
context=default
allowguest=yes
allowoverlap=no
realm=McConfig VoIP Server
srvlookup=yes
language=ru
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
[authentication]
[discounttelecom]
type=peer
insecure=invite
secret=
username=74959845383
fromuser=74959845383
fromdomain=sip.discounttelecom.ru
host=sip.discounttelecom.ru
port=5060
dtmfmode=rfc2833
allow = all
canreinvite=no
;============================ Users ===========================
[1000] ;ITCrowd
qualify=yes
context=LocalAndPSTNAndMobileAndLD
type=friend
username=1000
secret=
nat=yes
allow=all
host=dynamic
callerid="IT Crowd"
callgroup=1
pickupgroup=1
language=ru
canreinvite=yes
mailbox=1000@fantasyworld.org,1000
[1001] ;Support
qualify=yes
context=LocalAndPSTNAndMobileAndLD
type=friend
username=1001
secret=1001
nat=yes
allow=all
host=dynamic
callerid="Support"
callgroup=1
pickupgroup=1
language=ru
canreinvite=yes
mailbox=1001@fantasyworld.org,1001
extensions.confКод: Выделить всё
[general]
priorityjumping=yes
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
[globals]
DYNAMIC_FEATURES=automon
[default]
include => 74959845383
include => OSoftSipNet
include => NSoftSipNet
include => LocalOnly
include => LocalAndPSTN
include => LocalAndPSTNAndMobile
include => LocalAndPSTNAndMobileAndLD
;==================== Start SIPNET IN =======================
[74959845383]
exten => s,1,Answer
exten => s,2,Set(TIMEOUT(digit)=5)
exten => s,3,Set(TIMEOUT(response)=10)
exten => s,4,BackGround(test/1)
exten => s,5,WaitExten(5)
exten => s,6,Dial(SIP/1000,20,otmw)
exten => s,7,Voicemail
exten => s,8,Hangup
exten => i,1,Dial(SIP/1000,300,otmw)
exten => i,2,Hangup
exten => _97XXXX,1,Goto(LocalAndPSTNAndMobileAndLD,${EXTEN},1)
;================== end SIPNET IN ==========================
;================== Start CONTEXT ==========================
[OSoftSipNet]
exten => _9XXXXXXX,1,Dial(SIP/discounttelecom/${EXTEN:1})
[NSoftSipNet]
include => OSoftSipNet
exten => _900XXXXXXXX,1,Dial(SIP/discounttelecom/${EXTEN:1})
[LocalOnly]
include => NSoftSipNet
exten => _XXXX,1,Dial(SIP/${EXTEN:0})
[LocalAndPSTN]
include => LocalOnly
exten => _97XXXXXXX,1,Dial(SIP/discounttelecom/${EXTEN:1})
[LocalAndPSTNAndMobile]
include => LocalAndPSTN
exten => _97XXXXXXXXX,1,Dial(SIP/discounttelecom/${EXTEN:1})
[LocalAndPSTNAndMobileAndLD]
include => LocalAndPSTNAndMobile
exten => _979XXXXXXXXXX,1,Dial(SIP/discounttelecom/${EXTEN:1})
;================== End CONTEXT ============================
;=================== Start VOICE MAIL ======================
exten => 8000,1,VoiceMailMain
exten => 8000,2,Hangup
;=================== End VOICE MAIL ========================
;=================== Start ALL USERS =======================
; exten => 1000,1,Dial(SIP/1000,300,rtwW)
; exten => 1000,2,Hangup
exten => 1000,1,Dial(SIP/1000,8,rtwW)
exten => 1000,2,Dial(SIP/79015582351@sip.discounttelecom.ru,300,rtwW)
exten => 1000,3,Hangup
exten => 1001,1,Dial(SIP/1001,8,rtwW)
exten => 1001,2,Voicemail
exten => 1001,3,Hangup
; exten => 1000,1,GotoIfTime(9:00-18:00|mon-fri|*|*?4)
; exten => 1000,2,Dial(SIP/1000,15,rtwW)
; exten => 1000,3,Goto(8)
; exten => 1000,4,Dial(SIP/1000.15,rtwW)
; exten => 1000,5,Set(CALLERID(num)=3578378)
; exten => 1000,6,Set(CALLERID(name)=my_astrerisk)
; exten => 1000,7,Dial(SIP/79015582351@sip.discounttelecom.ru,300,Wj)
; exten => 1000,8,Hangup
;==================== End ALL USERS ========================