Делаю базовую настройку нового сервера. Конфиги следующего содержания:
sip.conf:
Код: Выделить всё
;; SIP Provider
[Provider]
type=peer
username=*
defaultuser=*
fromuser=*
secret=*
host=80.87.*.*
nat=yes
disallow=all
allow=alaw
allow=ulaw
allow=g729
insecure=port,invite
qualify=yes
;;Template for local peers
[office]
type=friend
host=dynamic
dtmfmode=rfc2833
nat=yes
canreinvite=no
qualify=yes
disallow=all
allow=alaw
allow=g729
allow=ulaw
context=outgoing
;;Local peers
[100](office)
username=100
secret=qwe123qwe123
callerid="100" <100>
call-limit=2
[102](office)
username=102
secret=qwe123qwe123
callerid="102" <102>
call-limit=2
Код: Выделить всё
[general]
static=yes
writeprotect=no
clearglobalvars=no
[local]
exten => _XXX,1,Dial(SIP/${EXTEN},Tt)
exten => _XXX,n,Hangup
[outgoing]
exten => _XXXXXXXXXXX,1,Dial(SIP/lek/${EXTEN},180,T)
exten => _XXXXXXXX,1,Dial(SIP/lek/${EXTEN},180,T)
exten => _XXXXXXX,1,Dial(SIP/lek/${EXTEN},180,T)
Он почему-то посылает BYE в момент инициализации звонка.
Код: Выделить всё
<--- SIP read from UDP:80.87.204.248:52046 --->
REGISTER sip:80.87.204.246:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-f67fb4096e188b24-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:100@192.168.48.172:52046;rinstance=e42d525fb0efdce0>
To: "100"<sip:100@80.87.204.246:5060>
From: "100"<sip:100@80.87.204.246:5060>;tag=3e116758
Call-ID: ZDcxMWE0OTI0MDA3M2Q3NGViZDU1NDQzM2MwYmY0NGU.
CSeq: 25 REGISTER
Expires: 120
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
Supported: replaces
User-Agent: 3CXPhone 6.0.26523.0
Authorization: Digest username="100",realm="asterisk",nonce="4688ae92",uri="sip:80.87.204.246:5060",response="f1cdef502c1f3b8337f698b1e7eff5d4",algorithm=MD5
Content-Length: 0
<------------->
--- (14 headers 0 lines) ---
Sending to 80.87.204.248:52046 (NAT)
<--- Transmitting (NAT) to 80.87.204.248:52046 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-f67fb4096e188b24-1---d8754z-;received=80.87.204.248;rport=52046
From: "100"<sip:100@80.87.204.246:5060>;tag=3e116758
To: "100"<sip:100@80.87.204.246:5060>;tag=as7d191680
Call-ID: ZDcxMWE0OTI0MDA3M2Q3NGViZDU1NDQzM2MwYmY0NGU.
CSeq: 25 REGISTER
Server: Asterisk PBX 11.0.0-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="71890a99"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'ZDcxMWE0OTI0MDA3M2Q3NGViZDU1NDQzM2MwYmY0NGU.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:80.87.204.248:52046 --->
REGISTER sip:80.87.204.246:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-ba00cf7084144126-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:100@192.168.48.172:52046;rinstance=e42d525fb0efdce0>
To: "100"<sip:100@80.87.204.246:5060>
From: "100"<sip:100@80.87.204.246:5060>;tag=3e116758
Call-ID: ZDcxMWE0OTI0MDA3M2Q3NGViZDU1NDQzM2MwYmY0NGU.
CSeq: 26 REGISTER
Expires: 120
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
Supported: replaces
User-Agent: 3CXPhone 6.0.26523.0
Authorization: Digest username="100",realm="asterisk",nonce="71890a99",uri="sip:80.87.204.246:5060",response="002c08c442f44e6c167816edb60c9bab",algorithm=MD5
Content-Length: 0
<------------->
--- (14 headers 0 lines) ---
Sending to 80.87.204.248:52046 (NAT)
Reliably Transmitting (NAT) to 80.87.204.248:52046:
OPTIONS sip:100@192.168.48.172:52046;rinstance=e42d525fb0efdce0 SIP/2.0
Via: SIP/2.0/UDP 80.87.204.246:5060;branch=z9hG4bK2ead5b76;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@80.87.204.246>;tag=as19345089
To: <sip:100@192.168.48.172:52046;rinstance=e42d525fb0efdce0>
Contact: <sip:asterisk@80.87.204.246:5060>
Call-ID: 3ae9d00335dffdd65d4798da21145ce0@80.87.204.246:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 11.0.0-rc1
Date: Thu, 10 Oct 2013 16:21:45 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
---
<--- Transmitting (NAT) to 80.87.204.248:52046 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-ba00cf7084144126-1---d8754z-;received=80.87.204.248;rport=52046
From: "100"<sip:100@80.87.204.246:5060>;tag=3e116758
To: "100"<sip:100@80.87.204.246:5060>;tag=as7d191680
Call-ID: ZDcxMWE0OTI0MDA3M2Q3NGViZDU1NDQzM2MwYmY0NGU.
CSeq: 26 REGISTER
Server: Asterisk PBX 11.0.0-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Expires: 120
Contact: <sip:100@192.168.48.172:52046;rinstance=e42d525fb0efdce0>;expires=120
Date: Thu, 10 Oct 2013 16:21:45 GMT
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog 'ZDcxMWE0OTI0MDA3M2Q3NGViZDU1NDQzM2MwYmY0NGU.' in 32000 ms (Method: REGISTER)
<--- SIP read from UDP:80.87.204.248:52046 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 80.87.204.246:5060;branch=z9hG4bK2ead5b76;rport=5060
Contact: <sip:192.168.48.172:52046>
To: <sip:100@192.168.48.172:52046;rinstance=e42d525fb0efdce0>;tag=5c16551c
From: "asterisk"<sip:asterisk@80.87.204.246>;tag=as19345089
Call-ID: 3ae9d00335dffdd65d4798da21145ce0@80.87.204.246:5060
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
Supported: replaces
Allow-Events: presence, message-summary, tunnel-info
Content-Length: 0
<------------->
--- (13 headers 0 lines) ---
Really destroying SIP dialog '3ae9d00335dffdd65d4798da21145ce0@80.87.204.246:5060' Method: OPTIONS
-- SIP/lek-0000001b is making progress passing it to SIP/100-0000001a
Audio is at 16852
Adding codec 100004 (alaw) to SDP
Adding codec 100003 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Transmitting (NAT) to 80.87.204.248:52046 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-a72c912501345e2b-1---d8754z-;received=80.87.204.248;rport=52046
From: "100"<sip:100@80.87.204.246:5060>;tag=a646042a
To: <sip:89500201650@80.87.204.246:5060>;tag=as1d3373f7
Call-ID: NzhhY2Q5MTJmODJhNTQ4MTI4MmJiMzRjMWUwZTZiNWM.
CSeq: 2 INVITE
Server: Asterisk PBX 11.0.0-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:89500201650@80.87.204.246:5060>
Content-Type: application/sdp
Content-Length: 285
v=0
o=root 1952354595 1952354595 IN IP4 80.87.204.246
s=Asterisk PBX 11.0.0-rc1
c=IN IP4 80.87.204.246
t=0 0
m=audio 16852 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
m=video 0 RTP/AVP 34
<------------>
<--- SIP read from UDP:80.87.204.248:52046 --->
BYE sip:89500201650@80.87.204.246:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-230b0828a32baf17-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:100@192.168.48.172:52046;rinstance=e42d525fb0efdce0>
To: <sip:89500201650@80.87.204.246:5060>;tag=as1d3373f7
From: "100"<sip:100@80.87.204.246:5060>;tag=a646042a
Call-ID: NzhhY2Q5MTJmODJhNTQ4MTI4MmJiMzRjMWUwZTZiNWM.
CSeq: 3 BYE
User-Agent: 3CXPhone 6.0.26523.0
Authorization: Digest username="100",realm="asterisk",nonce="1db8288b",uri="sip:89500201650@80.87.204.246:5060",response="b94cf666687b72671f38a23372a5ff4e",algorithm=MD5
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
<--- Reliably Transmitting (NAT) to 80.87.204.248:52046 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-a72c912501345e2b-1---d8754z-;received=80.87.204.248;rport=52046
From: "100"<sip:100@80.87.204.246:5060>;tag=a646042a
To: <sip:89500201650@80.87.204.246:5060>;tag=as1d3373f7
Call-ID: NzhhY2Q5MTJmODJhNTQ4MTI4MmJiMzRjMWUwZTZiNWM.
CSeq: 2 INVITE
Server: Asterisk PBX 11.0.0-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
Sending to 80.87.204.248:52046 (NAT)
Scheduling destruction of SIP dialog 'NzhhY2Q5MTJmODJhNTQ4MTI4MmJiMzRjMWUwZTZiNWM.' in 6784 ms (Method: BYE)
<--- Transmitting (NAT) to 80.87.204.248:52046 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-230b0828a32baf17-1---d8754z-;received=80.87.204.248;rport=52046
From: "100"<sip:100@80.87.204.246:5060>;tag=a646042a
To: <sip:89500201650@80.87.204.246:5060>;tag=as1d3373f7
Call-ID: NzhhY2Q5MTJmODJhNTQ4MTI4MmJiMzRjMWUwZTZiNWM.
CSeq: 3 BYE
Server: Asterisk PBX 11.0.0-rc1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
== Spawn extension (outgoing, 89500201650, 1) exited non-zero on 'SIP/100-0000001a'
<--- SIP read from UDP:80.87.204.248:52046 --->
ACK sip:89500201650@80.87.204.246:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.48.172:52046;branch=z9hG4bK-d8754z-a72c912501345e2b-1---d8754z-;rport
Max-Forwards: 70
To: <sip:89500201650@80.87.204.246:5060>;tag=as1d3373f7
From: "100"<sip:100@80.87.204.246:5060>;tag=a646042a
Call-ID: NzhhY2Q5MTJmODJhNTQ4MTI4MmJiMzRjMWUwZTZiNWM.
CSeq: 2 ACK
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
Really destroying SIP dialog 'NzhhY2Q5MTJmODJhNTQ4MTI4MmJiMzRjMWUwZTZiNWM.' Method: BYE
<--- SIP read from UDP:80.87.204.248:52046 --->
<------------->
Подскажите, пожалуйста, в чем может быть проблема?