클라이언트의 webrtc를 호출 할 때 사용자 지정 헤더를 추가해야합니다. 별표 13 + siphtml5에 사용됩니다. dialplan을 :별표 : PJSIP_HEADER 및 Websocket
exten => 198,1,Answer()
same => n,Set(PJSIP_HEADER(add,X-DRP)=71234567890)
same => n,DIAL(PJSIP/${EXTEN})
별표 로그 : 난 내 브라우저의 디버그 로그에 헤더 X-DRP를 찾을 수 없습니다
Connected to Asterisk 13.17.2 currently running on ubuntu-xenial (pid = 8895)
== WebSocket connection from '192.168.0.44:58096' forcefully closed due to fatal write error
== WebSocket connection from '192.168.0.44:58595' for protocol 'sip' accepted using version '13'
-- Added contact 'sip:[email protected]:58595;transport=ws' to AOR '199' with expiration of 450 seconds
== Contact 199/sip:[email protected]:58595;transport=ws has been created
== Contact 199/sip:[email protected]:58096;transport=ws has been deleted
-- Contact 199/sip:[email protected]:58595;transport=ws is now Unknown. RTT: 0.000 msec
== Setting global variable 'SIPDOMAIN' to 'aster13'
== DTLS ECDH initialized (automatic), faster PFS enabled
-- Executing [[email protected]:1] Answer("PJSIP/199-00000008", "") in new stack
> 0x7f0ea0071960 -- Strict RTP learning after remote address set to: 123.135.239.111:58827
[Oct 23 16:02:31] ERROR[8943]: pjproject:0 <?>: icess0x7f0ea000ce18 ..Error sending STUN request: Network is unreachable
[Oct 23 16:02:31] ERROR[8943]: pjproject:0 <?>: icess0x7f0ea000ce18 ..Error sending STUN request: Network is unreachable
> 0x7f0ea0071960 -- Strict RTP learning after ICE completion
> 0x7f0ea0071960 -- Strict RTP switching to RTP target address 192.168.100.97:58827 as source
-- Executing [[email protected]:2] SIPAddHeader("PJSIP/199-00000008", "X-DRP: 79161234567") in new stack
-- Executing [[email protected]:3] Set("PJSIP/199-00000008", "PJSIP_HEADER(add,X-DRP)=79161234567") in new stack
-- Executing [[email protected]:4] Verbose("PJSIP/199-00000008", "Set(OldContact="199" <sips:[email protected]:54514;transport=ws;rtcweb-breaker=no;click2call=no>;+g.oma.sip-im;language="en,fr")") in new stack
Set(OldContact=199 <sips:[email protected]:54514;transport=ws;rtcweb-breaker=no;click2call=no>;+g.oma.sip-im;language=en,fr)
-- Executing [[email protected]:5] Dial("PJSIP/199-00000008", "PJSIP/198") in new stack
-- Called PJSIP/198
-- PJSIP/199-00000008 requested media update control 26, passing it to PJSIP/198-00000009
== DTLS ECDH initialized (automatic), faster PFS enabled
-- PJSIP/198-00000009 is ringing
> 0x7f0ea0071960 -- Strict RTP learning complete - Locking on source address 192.168.100.97:58827
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [[email protected]:7] Hangup("PJSIP/199-00000008", "") in new stack
== Spawn extension (default, 198, 7) exited non-zero on 'PJSIP/199-00000008'
-- Added contact 'sips:[email protected]:54514;transport=ws;rtcweb-breaker=no' to AOR '199' with expiration of 200 seconds
== Contact 199/sips:[email protected]:54514;transport=ws;rtcweb-breaker=no has been created
== Contact 199/sip:[email protected]:58595;transport=ws has been deleted
-- Contact 199/sips:[email protected]:54514;transport=ws;rtcweb-breaker=no is now Unknown. RTT: 0.000 msec
그리고 :
recv=INVITE sips:[email protected]:54445;transport=ws;rtcweb-breaker=no SIP/2.0
Via: SIP/2.0/WSS 192.168.100.97:54445;rport;branch=z9hG4bKPja4ca4b5b-62c2-4953-a761-d13d34696007;alias
From: "199"<sip:[email protected]>;tag=a1b0c71d-f89b-4226-a84e-82e7db8b2b21
To: <sips:[email protected];rtcweb-breaker=no>
Contact: <sips:[email protected]:5060;transport=ws>
Call-ID: a47911b2-c6d4-4222-961b-f0418a4e00c0
CSeq: 30108 INVITE
Content-Type: application/sdp
Content-Length: 1085
Allow: OPTIONS,SUBSCRIBE,NOTIFY,PUBLISH,INVITE,ACK,BYE,CANCEL,UPDATE,PRACK,REGISTER,MESSAGE,REFER
Supported: 100rel,timer,replaces,norefersub
Session-Expires: 1800;refresher=uac
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 13.17.2
v=0
o=- 780155122 780155122 IN IP4 192.168.49.32
s=Asterisk
c=IN IP4 192.168.49.32
t=0 0
m=audio 15018 UDP/TLS/RTP/SAVPF 0 101
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 AA:94:9A:8F:24:9A:BD:C2:6B:BA:57:4D:E2:D3:1F:1E:B1:F9:87:B1:96:C7:29:93:B8:75:16:D6:73:9D:1E:3E
a=ice-ufrag:3e3de33532c2fcdc32d71b2f086be032
a=ice-pwd:78e4b4b93a861933107a205a10cac6dd
a=candidate:Hc92a8000 1 UDP 2130706431 fe80::14:68ff:fe3e:8447 15018 typ host
a=candidate:H6893915f 1 UDP 2130706431 fe80::a00:27ff:feeb:a9e 15018 typ host
a=candidate:Ha00020f 1 UDP 2130706431 10.0.2.15 15018 typ host
a=candidate:Hc0a83120 1 UDP 2130706431 192.168.49.32 15018 typ host
a=candidate:Hc92a8000 2 UDP 2130706430 fe80::14:68ff:fe3e:8447 15019 typ host
a=candidate:H6893915f 2 UDP 2130706430 fe80::a00:27ff:feeb:a9e 15019 typ host
a=candidate:Ha00020f 2 UDP 2130706430 10.0.2.15 15019 typ host
a=candidate:Hc0a83120 2 UDP 2130706430 192.168.49.32 15019 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
a=rtcp-mux
는 PJSIP가 웹 소켓에 대한 PJSIP_HEADER을 지원합니까? webrtc 클라이언트에 대한 INVOTE에 사용자 정의 헤더를 추가하는 다른 방법이 있습니까?
P. stackoverflow는 더 자세한 정보를 추가하도록 요청합니다. 그래서 별표 13과 siphtml5 웹 클라이언트를 사용합니다. 또한 wireshark를 사용하여 wss 트래픽을 확인하고 해독 할 수 있으며 여전히 X-DRP 헤더를 찾을 수 없습니다.