ignik писал(а):
Показывай тестовый конфиг и log'и aterisk'а.
вот кусок из sip.conf
========================
[361] ; xlite phone
type=friend
host=dynamic
username=361
secret=0
nat=no
canreinvite=no
dtmfmode=rfc2833
context=office
callerid="Spider" <361>
allow=gsm
allow=ulaw
allow=alaw
[2000] ;dlink
type=friend
host=dynamic
username=2000
secret=0
insecure=very
nat=yes
canreinvite=no
dtmfmode=rfc3323
context=office
callerid="User1" <2000>
allow=gsm
allow=ulaw
allow=alaw
[2001] ;dlink
type=friend
host=dynamic
username=2001
secret=0
nat=yes
canreinvite=no
dtmfmode=rfc2833
context=office
callerid="Tany" <2001>
;allow=all
allow=ulaw
;allow=alaw
[2002] ;dlink
type=friend
host=dynamic
username=2002
secret=0
nat=route
canreinvite=no
dtmfmode=rfc2833
context=office
callerid="Dron" <2002>
allow=gsm
allow=ulaw
allow=alaw
[2003] ;dlink
type=friend
host=dynamic
username=2003
secret=2
nat=yes
canreinvite=no
;dtmfmode=rfc2833
context=office
callerid="Freddy" <2003>
allow=gsm
allow=ulaw
allow=alaw
===============================================
Это сыпит dvg2030s в консоли
----------------------------------------------------------------------------------------------
[admin]# INVITE sip:2001@10.0.8.2:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.8.149:5060;branch=z9hG4bK145c9672;rport
From: "Spider" <sip:361@10.0.8.149>;tag=as617a12e3
To: <sip:2001@10.0.8.2:5060>
Contact: <sip:361@10.0.8.149>
Call-ID: 5e6bce831d4725b44cc17aa927bf4160@10.0.8.149
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Thu, 02 Nov 2006 15:19:40 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 309
v=0
o=root 16130 16130 IN IP4 10.0.8.149
s=session
c=IN IP4 10.0.8.149
t=0 0
m=audio 17428 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 - - - -
m=video 14314 RTP/AVP 34
a=rtpmap:34 H263/90000
ACK sip:2001@10.0.8.2:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.8.149:5060;branch=z9hG4bK145c9672;rport
From: "Spider" <sip:361@10.0.8.149>;tag=as617a12e3
To: <sip:2001@10.0.8.2:5060>
Contact: <sip:361@10.0.8.149>
Call-ID: 5e6bce831d4725b44cc17aa927bf4160@10.0.8.149
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0
49>
Content-Length: 0
-------------------------------------------------------------------------------------------------------------
наэтом asterisk зачитывает набранный номер и предлагает оставить сообщение
-------------------------------------------------------------------------------------------------------------
*CLI> dial 2003@office
-- Executing Macro("OSS/dsp", "stdexten|2003|SIP/2003") in new stack
-- Executing Dial("OSS/dsp", "SIP/2003|20") in new stack
-- Called 2003
-- Got SIP response 400 "Bad Request" back from 10.0.8.2
-- SIP/2003-0547 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing Goto("OSS/dsp", "s-CONGESTION|1") in new stack
-- Goto (macro-stdexten,s-CONGESTION,1)
-- Executing Goto("OSS/dsp", "s-NOANSWER|1") in new stack
-- Goto (macro-stdexten,s-NOANSWER,1)
-- Executing VoiceMail("OSS/dsp", "u2003") in new stack
<< Console call has been answered >>
-- Playing 'vm-theperson' (language 'en')
-- Playing 'digits/2' (language 'en')
-- Playing 'digits/0' (language 'en')
-- Playing 'digits/0' (language 'en')
-- Playing 'digits/3' (language 'en')
-- Playing 'vm-isunavail' (language 'en')
-- Playing 'vm-intro' (language 'en')
-- Playing 'beep' (language 'en')
-- Recording the message
-- x=0, open writing: /var/spool/asterisk/voicemail/office/2003/INBOX/msg0000 format: wav49, 0x8128cf0
-- x=1, open writing: /var/spool/asterisk/voicemail/office/2003/INBOX/msg0000 format: gsm, 0x81533c0
-- x=2, open writing: /var/spool/asterisk/voicemail/office/2003/INBOX/msg0000 format: wav, 0x8153510
----------
*CLI> dial 2001@office
*CLI> -- Executing Macro("OSS/dsp", "stdexten|2001|SIP/2001") in new stack
-- Executing Dial("OSS/dsp", "SIP/2001|20") in new stack
-- Called 2001
-- Got SIP response 400 "Bad Request" back from 10.0.8.2
-- SIP/2001-bbe8 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing Goto("OSS/dsp", "s-CONGESTION|1") in new stack
-- Goto (macro-stdexten,s-CONGESTION,1)
-- Executing Goto("OSS/dsp", "s-NOANSWER|1") in new stack
-- Goto (macro-stdexten,s-NOANSWER,1)
-- Executing VoiceMail("OSS/dsp", "u2001") in new stack
<< Console call has been answered >>
-- Playing 'vm-theperson' (language 'en')
-- Playing 'digits/2' (language 'en')
-- Playing 'digits/0' (language 'en')
-- Playing 'digits/0' (language 'en')
-- Playing 'digits/1' (language 'en')
-- Playing 'vm-isunavail' (language 'en')
-- Playing 'vm-intro' (language 'en')
-- Playing 'beep' (language 'en')
-- Recording the message
-- x=0, open writing: /var/spool/asterisk/voicemail/office/2001/INBOX/msg0007 format: wav49, 0x8128ce0
-- x=1, open writing: /var/spool/asterisk/voicemail/office/2001/INBOX/msg0007 format: gsm, 0x8176448
-- x=2, open writing: /var/spool/asterisk/voicemail/office/2001/INBOX/msg0007 format: wav, 0x8176558
=======================================================================
-- Executing Macro("SIP/361-0cde", "stdexten|2002|SIP/2002") in new stack
-- Executing Dial("SIP/361-0cde", "SIP/2002|20") in new stack
We're at 10.0.8.149 port 10178
Video is at 10.0.8.149 port 17094
Answering/Requesting with root capability 0x2 (gsm)
Answering with preferred capability 0x4 (ulaw)
Answering with capability 0x8 (alaw)
Answering with capability 0x80000 (h263)
Answering with non-codec capability 0x1 (telephone-event)
12 headers, 14 lines
Reliably Transmitting (NAT) to 10.0.8.2:5060:
INVITE sip:2002@10.0.8.2:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.8.149:5060;branch=z9hG4bK7a5d9ecb;rport
From: "Spider" <sip:361@10.0.8.149>;tag=as01aa7987
To: <sip:2002@10.0.8.2:5060>
Contact: <sip:361@10.0.8.149>
Call-ID: 06aea5520843c1eb49a11d6653252cb1@10.0.8.149
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Date: Tue, 07 Nov 2006 13:33:04 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Content-Type: application/sdp
Content-Length: 309
v=0
o=root 20443 20443 IN IP4 10.0.8.149
s=session
c=IN IP4 10.0.8.149
t=0 0
m=audio 10178 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 - - - -
m=video 17094 RTP/AVP 34
a=rtpmap:34 H263/90000
---
-- Called 2002
<-- SIP read from 10.0.8.2:5060:
SIP/2.0 400 Bad Request
v: SIP/2.0/UDP 10.0.8.149:5060;branch=z9hG4bK7a5d9ecb;rport
f: "Spider"<sip:361@10.0.8.149>;tag=as01aa7987
t: <sip:2002@10.0.8.2>
i: 06aea5520843c1eb49a11d6653252cb1@10.0.8.149
CSeq: 102 INVITE
l: 0
--- (7 headers 0 lines)---
-- Got SIP response 400 "Bad Request" back from 10.0.8.2
Transmitting (NAT) to 10.0.8.2:5060:
ACK sip:2002@10.0.8.2:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.8.149:5060;branch=z9hG4bK7a5d9ecb;rport
From: "Spider" <sip:361@10.0.8.149>;tag=as01aa7987
To: <sip:2002@10.0.8.2:5060>
Contact: <sip:361@10.0.8.149>
Call-ID: 06aea5520843c1eb49a11d6653252cb1@10.0.8.149
CSeq: 102 ACK
User-Agent: Asterisk PBX
Content-Length: 0
---
-- SIP/2002-5a3a is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Executing Goto("SIP/361-0cde", "s-CONGESTION|1") in new stack
-- Goto (macro-stdexten,s-CONGESTION,1)
-- Executing Goto("SIP/361-0cde", "s-NOANSWER|1") in new stack
-- Goto (macro-stdexten,s-NOANSWER,1)
-- Executing VoiceMail("SIP/361-0cde", "u2002") in new stack
-- Playing 'vm-theperson' (language 'ru')
Destroying call '06aea5520843c1eb49a11d6653252cb1@10.0.8.149'
-- Playing 'digits/2' (language 'ru')
== Spawn extension (macro-stdexten, s-NOANSWER, 1) exited non-zero on 'SIP/361-0cde' in macro 'stdexten'
== Spawn extension (office, 2002, 1) exited non-zero on 'SIP/361-0cde'