Решил потестить че за новинка такая под названием WebRTC для этого обновился до 11.5.1
скачал отсюда http://code.google.com/p/sipml5/source/checkout код simpl5 закинул в апач.
Сконфигурировал как описано здесь http://code.google.com/p/sipml5/wiki/Asterisk
Зашел по ссылке http://ip apache где лежит все это говно/simpl5/call.htm#
Что получилось:
1.Так называемый web софтфон (simpl5)регистрируется только если в настройках прописываю внешний ip-шник.
При такой регистрации web софтфон регистрируется с какого то непонятного адреса 188.165.231.30 я так понимаю это stun, далее входящие звонки проходят на ура голос ходит в обе стороны, а исходящие астер рубит вот так
Код: Выделить всё
chan_sip.c:25282 handle_request_invite: Failed to authenticate device <sip:116@xxx.xxx.xxx.xxx>;tag=13643947763
1.Как сделать чтобы этот так называемый web софтфон регистрировался на локальный ip астрериск и из под локального ip?
2.Как сделать исходящую связь
вот debug
Код: Выделить всё
srv01*CLI> sip set debug peer 116
SIP Debugging Enabled for IP: 188.165.231.30
<--- SIP read from UDP:188.165.231.30:13060 --->
INVITE sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bK-14135276469;rport
From: <sip:116@внешний ip asterisk>;tag=13345609971
To: <sip:112@внешний ip asterisk>
Contact: <sip:116@188.165.231.30:13060;transport=udp>
Call-ID: 2420a9a0-2110-3460-3141-c511bb256605
CSeq: 1129649264 INVITE
Content-Type: application/sdp
Content-Length: 1410
Max-Forwards: 70
User-Agent: webrtc2sip Media Server 2.5.1
v=0
o=doubango 1983 678901 IN IP4 188.165.231.30
s=-
c=IN IP4 188.165.231.30
t=0 0
a=acap:1 setup:passive
a=acap:2 connection:new
a=acap:3 fingerprint:sha-256 10:12:B6:62:5A:4F:49:91:80:5A:BA:E4:53:77:24:A2:ED:A9:C4:81:91:9A:25:C7:BB:04:29:89:12:94:38:48
a=acap:4 fingerprint:sha-1 F5:14:FE:25:8B:FB:8D:C3:8E:45:9B:EF:F5:38:9E:BE:A2:39:D8:D8
a=tcap:1 UDP/TLS/RTP/SAVPF UDP/TLS/RTP/SAVP RTP/SAVPF RTP/SAVP RTP/AVPF
m=audio 51584 RTP/AVP 111 8 0
c=IN IP4 188.165.231.30
a=ptime:20
a=minptime:1
a=maxptime:255
a=silenceSupp:off - - - -
a=rtpmap:111 opus/48000/2
a=fmtp:111 maxplaybackrate=48000; sprop-maxcapturerate=48000; stereo=0; sprop-stereo=0; useinbandfec=0; usedtx=0
a=rtpmap:8 PCMA/8000/1
a=rtpmap:0 PCMU/8000/1
a=acap:5 crypto:1 AES_CM_128_HMAC_SHA1_80 inline:9Ts/m1vJU/8Gi64wD0UWGs4EC6MH2Yke3ksCyr1D
a=acap:6 crypto:2 AES_CM_128_HMAC_SHA1_32 inline:eaWjDBRMgQEhHvT9ixxAz3BF0gTAE5yAeW0CTvlz
a=pcfg:1 t=1 a=1,2,4|3
a=pcfg:2 t=2 a=1,2,4|3
a=pcfg:3 t=3 a=5,6
a=pcfg:4 t=4 a=5,6
a=pcfg:5 t=5
a=sendrecv
a=rtcp-mux
a=ssrc:1328504516 cname:4ae8df34dbbc938b19fc1bd1a82283c8
a=ssrc:1328504516 mslabel:6994f7d1-6ce9-4fbd-acfd-84e5131ca2e2
a=ssrc:1328504516 label:doubango@audio
a=ice-ufrag:jHTPlI37ZcFeBlP
a=ice-pwd:8xE1RT19Mw6rFAopozCp5
a=candidate:0U1F4kRk1 1 udp 2130706431 188.165.231.30 51584 typ host
a=candidate:0U1F4kRk1 2 udp 2130706430 188.165.231.30 51585 typ host
<------------->
--- (11 headers 36 lines) ---
Sending to 188.165.231.30:13060 (no NAT)
Sending to 188.165.231.30:13060 (no NAT)
Using INVITE request as basis request - 2420a9a0-2110-3460-3141-c511bb256605
Found peer '116' for '116' from 188.165.231.30:13060
<--- Reliably Transmitting (no NAT) to 188.165.231.30:13060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bK-14135276469;received=188.165.231.30;rport=13060
From: <sip:116@внешний ip asterisk>;tag=13345609971
To: <sip:112@внешний ip asterisk>;tag=as32059f6a
Call-ID: 2420a9a0-2110-3460-3141-c511bb256605
CSeq: 1129649264 INVITE
Server: Asterisk PBX 11.5.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="45af43aa"
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '2420a9a0-2110-3460-3141-c511bb256605' in 11712 ms (Method: INVITE)
<--- SIP read from UDP:188.165.231.30:13060 --->
ACK sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bK-14135276469;rport
From: <sip:116@внешний ip asterisk>;tag=13345609971
To: <sip:112@внешний ip asterisk>;tag=as32059f6a
Call-ID: 2420a9a0-2110-3460-3141-c511bb256605
CSeq: 1129649264 ACK
Content-Length: 0
Max-Forwards: 70
<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:188.165.231.30:13060 --->
INVITE sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bK-14094434412;rport
From: <sip:116@внешний ip asterisk>;tag=13345609971
To: <sip:112@внешний ip asterisk>
Contact: <sip:116@188.165.231.30:13060;transport=udp>
Call-ID: 2420a9a0-2110-3460-3141-c511bb256605
CSeq: 1129649265 INVITE
Content-Type: application/sdp
Content-Length: 1410
Max-Forwards: 70
Authorization: Digest username="116",realm="asterisk",nonce="45af43aa",uri="sip:112@внешний ip asterisk",response="ab9d357ded1c673ca3ff2af148295fb9",algorithm=MD5
User-Agent: webrtc2sip Media Server 2.5.1
v=0
o=doubango 1983 678901 IN IP4 188.165.231.30
s=-
c=IN IP4 188.165.231.30
t=0 0
a=acap:1 setup:passive
a=acap:2 connection:new
a=acap:3 fingerprint:sha-256 10:12:B6:62:5A:4F:49:91:80:5A:BA:E4:53:77:24:A2:ED:A9:C4:81:91:9A:25:C7:BB:04:29:89:12:94:38:48
a=acap:4 fingerprint:sha-1 F5:14:FE:25:8B:FB:8D:C3:8E:45:9B:EF:F5:38:9E:BE:A2:39:D8:D8
a=tcap:1 UDP/TLS/RTP/SAVPF UDP/TLS/RTP/SAVP RTP/SAVPF RTP/SAVP RTP/AVPF
m=audio 51584 RTP/AVP 111 8 0
c=IN IP4 188.165.231.30
a=ptime:20
a=minptime:1
a=maxptime:255
a=silenceSupp:off - - - -
a=rtpmap:111 opus/48000/2
a=fmtp:111 maxplaybackrate=48000; sprop-maxcapturerate=48000; stereo=0; sprop-stereo=0; useinbandfec=0; usedtx=0
a=rtpmap:8 PCMA/8000/1
a=rtpmap:0 PCMU/8000/1
a=acap:5 crypto:1 AES_CM_128_HMAC_SHA1_80 inline:9Ts/m1vJU/8Gi64wD0UWGs4EC6MH2Yke3ksCyr1D
a=acap:6 crypto:2 AES_CM_128_HMAC_SHA1_32 inline:eaWjDBRMgQEhHvT9ixxAz3BF0gTAE5yAeW0CTvlz
a=pcfg:1 t=1 a=1,2,4|3
a=pcfg:2 t=2 a=1,2,4|3
a=pcfg:3 t=3 a=5,6
a=pcfg:4 t=4 a=5,6
a=pcfg:5 t=5
a=sendrecv
a=rtcp-mux
a=ssrc:1328504516 cname:4ae8df34dbbc938b19fc1bd1a82283c8
a=ssrc:1328504516 mslabel:6994f7d1-6ce9-4fbd-acfd-84e5131ca2e2
a=ssrc:1328504516 label:doubango@audio
a=ice-ufrag:jHTPlI37ZcFeBlP
a=ice-pwd:8xE1RT19Mw6rFAopozCp5
a=candidate:0U1F4kRk1 1 udp 2130706431 188.165.231.30 51584 typ host
a=candidate:0U1F4kRk1 2 udp 2130706430 188.165.231.30 51585 typ host
<------------->
--- (12 headers 36 lines) ---
Sending to 188.165.231.30:13060 (no NAT)
Using INVITE request as basis request - 2420a9a0-2110-3460-3141-c511bb256605
Found peer '116' for '116' from 188.165.231.30:13060
[2013-09-30 17:41:03] NOTICE[13896][C-0000011d]: chan_sip.c:25282 handle_request_invite: Failed to authenticate device <sip:116@внешний ip asterisk>;tag=13345609971
<--- Reliably Transmitting (no NAT) to 188.165.231.30:13060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bK-14094434412;received=188.165.231.30;rport=13060
From: <sip:116@внешний ip asterisk>;tag=13345609971
To: <sip:112@внешний ip asterisk>;tag=as32059f6a
Call-ID: 2420a9a0-2110-3460-3141-c511bb256605
CSeq: 1129649265 INVITE
Server: Asterisk PBX 11.5.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0
<------------>
Scheduling destruction of SIP dialog '2420a9a0-2110-3460-3141-c511bb256605' in 11712 ms (Method: INVITE)
<--- SIP read from UDP:188.165.231.30:13060 --->
ACK sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bK-14094434412;rport
From: <sip:116@внешний ip asterisk>;tag=13345609971
To: <sip:112@внешний ip asterisk>;tag=as32059f6a
Call-ID: 2420a9a0-2110-3460-3141-c511bb256605
CSeq: 1129649265 ACK
Content-Length: 0
Max-Forwards: 70
<------------->
--- (8 headers 0 lines) ---
<--- SIP read from UDP:188.165.231.30:13060 --->
ACK sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;rport
From: "116"<sip:116@внешний ip asterisk>;tag=tMvzmxOvnfhRICL6iSsB
To: <sip:112@внешний ip asterisk>;tag=14096974440
Call-ID: c71e9b31-fc85-cd34-3f72-f9033f20c095
CSeq: 30896 ACK
Content-Length: 0
Max-Forwards: 70
Via: SIP/2.0/TCP внешний ip asterisk:2501;rport;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;ws-hacked=WSS
<------------->
--- (9 headers 0 lines) ---
<--- SIP read from UDP:188.165.231.30:13060 --->
ACK sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;rport
From: "116"<sip:116@внешний ip asterisk>;tag=tMvzmxOvnfhRICL6iSsB
To: <sip:112@внешний ip asterisk>;tag=14096974440
Call-ID: c71e9b31-fc85-cd34-3f72-f9033f20c095
CSeq: 30896 ACK
Content-Length: 0
Max-Forwards: 70
Via: SIP/2.0/TCP внешний ip asterisk:2501;rport;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;ws-hacked=WSS
<------------->
--- (9 headers 0 lines) ---
<--- SIP read from UDP:188.165.231.30:13060 --->
ACK sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;rport
From: "116"<sip:116@внешний ip asterisk>;tag=tMvzmxOvnfhRICL6iSsB
To: <sip:112@внешний ip asterisk>;tag=14096974440
Call-ID: c71e9b31-fc85-cd34-3f72-f9033f20c095
CSeq: 30896 ACK
Content-Length: 0
Max-Forwards: 70
Via: SIP/2.0/TCP внешний ip asterisk:2501;rport;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;ws-hacked=WSS
<------------->
--- (9 headers 0 lines) ---
<--- SIP read from UDP:188.165.231.30:13060 --->
ACK sip:112@внешний ip asterisk SIP/2.0
Via: SIP/2.0/UDP 188.165.231.30:13060;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;rport
From: "116"<sip:116@внешний ip asterisk>;tag=tMvzmxOvnfhRICL6iSsB
To: <sip:112@внешний ip asterisk>;tag=14096974440
Call-ID: c71e9b31-fc85-cd34-3f72-f9033f20c095
CSeq: 30896 ACK
Content-Length: 0
Max-Forwards: 70
Via: SIP/2.0/TCP внешний ip asterisk:2501;rport;branch=z9hG4bKnsRWJnmMtBiV43HHIxepVk0u6erEmAJN;ws-hacked=WSS
<------------->
--- (9 headers 0 lines) ---
srv01*CLI> exit
Asterisk cleanly ending (0).
Executing last minute cleanups
Asterisk ending (0).