Nachdem ich einige Tage lang pjsip getestet habe, habe ich ein bisschen verstanden, wie es funktioniert. Ich hoffte, dass es mir helfen wird, WebRTC Aufrufe von der Site zu machen.Asterisk 13.10 + pjsip + WebRTC - Rx Pufferüberlauf (PJSIP_ERXOVERFLOW)
Situation:
- Ich kann üblichen Anrufe mit Asterisk anrufen und erhalten
- für WebRTC Ich versuchte sipml5, Sip.js, JsSIP (derzeit mit sipml5)
- sipml5 auf meinen Server verbindet (haben "Connected")
Hier ist pjsip "WebRTC" config (bis jetzt):
[webrtc]
type=endpoint
transport=transport-udp
context=webrtc
disallow=all
allow=alaw
allow=ulaw
dtls_cert_file=/etc/letsencrypt/live/example.org/fullchain.pem
dtls_private_key=/etc/letsencrypt/live/example.org/privkey.pem
auth=webrtc
aors=webrtc
use_avpf=yes
direct_media=no
[webrtc]
type=aor
contact=sip:[email protected]:5060
max_contacts=1000
outbound_proxy=sip:example.org
[webrtc]
type=auth
auth_type=userpass
username=webrtc
password=psswd
realm=example.org
Das Problem tritt auf, wenn ich einen Anruf:
[Sep 1 17:50:37] ERROR[7760] pjproject: sip_endpoint.c Error processing packet from 127.0.0.1:57928: Rx buffer overflow (PJSIP_ERXOVERFLOW) [code 171062]:
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKX7Ng7L0OKRBkpUqGlHPV4GfxO0I7d93i;rport
From: <sip:[email protected]>;tag=ypLlm1BDxPkn8aTTkVJL
To: <sip:[email protected]>
Contact: <sips:[email protected];rtcweb-breaker=no;click2call=no;transport=wss>;+g.oma.sip-im;language="en,fr"
Call-ID: 30f526f4-3c4f-e96f-391d-39290b9dc983
CSeq: 60845 INVITE
Content-Type: application/sdp
Content-Length: 3621
Max-Forwards: 70
User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04
Organization: Doubango Telecom
v=0
o=- 8456797239022316000 2 IN IP4 127.0.0.1
s=Doubango Telecom - chrome
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS gVGmhQ6UmwynNn99UhRNBJJjcV5AqYkpNF3M
m=audio 47942 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
c=IN IP4 ...
...
a=ice-ufrag:B0dVeWHjfVOT/n0s
a=ice-pwd:BP5DshTjqBa4CqBiZSb8ZpNp
a=fingerprint:sha-256 5B:41:25:27:9E:AD:F2:E9:F2:0A:D6:26:CF:FA:5A:C7:F3:7B:B6:35:32:9A:CF:04:35:2B:07:DB:A1:8F:2E:FD
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=sendrecv
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtp
Warum geschieht das? Die Aufgabe ist einfach: nur ein WebRTC Aufruf an die einfachste Asterisk Erweiterung machen (Playback(demo-congrats)
)
PS: Ich Proxy /ws
mit Nginx, das ist, warum es 127.0.0.1 ist in Error processing packet from 127.0.0.1:57928
.
Löse:
vim third-party/pjproject/patches/config_site.h
/* #define PJSIP_MAX_PKT_LEN 6000 */
#define PJ_ICE_MAX_CAND 32
#define PJ_ICE_MAX_CHECKS (PJ_ICE_MAX_CAND * 16)
#define PJSIP_MAX_PKT_LEN 12288
./configure --with-pjproject-bundled
make
make install
Warum ist das nicht standardmäßig groß genug param? – Sergey
Vielleicht, weil WebRTC nicht der primäre Anwendungsfall für die PJSIP-Bibliothek ist. /zucken –