Hi,
Please find below details as you asked, I can connect pjsip endpoint to asterisk but when click on call button no log coming on asterisk cli
pjsip.conf
[global]
type=global
debug=yes
[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0
[100]
type=aor
max_contacts=1
remove_existing=yes
[100]
type=auth
auth_type=userpass
username=100
password=100
[100]
type=endpoint
aors=100
auth=100
use_avpf=yes
media_encryption=dtls
dtls_ca_file=/etc/asterisk/keys/ca.crt
dtls_cert_file=/etc/asterisk/keys/asterisk.pem
dtls_verify=fingerprint
dtls_setup=actpass
ice_support=yes
media_use_received_transport=yes
rtcp_mux=yes
context=default
disallow=all
allow=opus
allow=ulaw
[101]
type=aor
max_contacts=1
remove_existing=yes
[101]
type=auth
auth_type=userpass
username=101
password=101
[101]
type=endpoint
aors=101
auth=101
use_avpf=yes
media_encryption=dtls
dtls_ca_file=/etc/asterisk/keys/ca.crt
dtls_cert_file=/etc/asterisk/keys/asterisk.pem
dtls_verify=fingerprint
dtls_setup=actpass
ice_support=yes
media_use_received_transport=yes
rtcp_mux=yes
context=default
disallow=all
allow=opus
allow=ulaw
http.conf
[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/etc/asterisk/keys/asterisk.pem
extensions.conf
[internal]
exten => echo,1,Answer()
same => n,StreamEcho(3)
same => n,Hangup()
exten => video-conference,1,Answer()
same => n,ConfBridge(guest)
same => n,Hangup()
exten => 100,1,Dial(PJSIP/100)
exten => 101,1,Dial(PJSIP/101)
pjsip endpoint connect disconnect logs:
asterisk15-VirtualBox*CLI>
<— Received SIP request (513 bytes) from WSS:192.168.0.46:53063 —>
REGISTER sip:192.168.0.187 SIP/2.0
Via: SIP/2.0/WSS 192.168.0.187;branch=z9hG4bK617849
Max-Forwards: 69
To: sip:100@192.168.0.187
From: sip:100@192.168.0.187;tag=nq5o807dne
Call-ID: 9d09al9nj4a7eimvhl6998
CSeq: 3 REGISTER
Contact: sip:100@192.168.0.187;+sip.ice;reg-id=1;+sip.instance=“urn:uuid:8727177f-9e92-4f1b-aad8-baa6373b9f03”;expires=0
Expires: 0
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 3.0.13
Content-Length: 0
<— Transmitting SIP response (455 bytes) to WSS:192.168.0.46:53063 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/WSS 192.168.0.187;rport=53063;received=192.168.0.46;branch=z9hG4bK617849
Call-ID: 9d09al9nj4a7eimvhl6998
From: sip:100@192.168.0.187;tag=nq5o807dne
To: sip:100@192.168.0.187;tag=z9hG4bK617849
CSeq: 3 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1509426656/e5dbc38c468f96d227218ee6f1e42b1e”,opaque=“40426fa31b7377a7”,algorithm=md5,qop="auth"
Server: Asterisk PBX 15.0.0
Content-Length: 0
<— Received SIP request (781 bytes) from WSS:192.168.0.46:53063 —>
REGISTER sip:192.168.0.187 SIP/2.0
Via: SIP/2.0/WSS 192.168.0.187;branch=z9hG4bK7488576
Max-Forwards: 69
To: sip:100@192.168.0.187
From: sip:100@192.168.0.187;tag=nq5o807dne
Call-ID: 9d09al9nj4a7eimvhl6998
CSeq: 4 REGISTER
Authorization: Digest algorithm=MD5, username=“100”, realm=“asterisk”, nonce=“1509426656/e5dbc38c468f96d227218ee6f1e42b1e”, uri=“sip:192.168.0.187”, response=“4dc3051c64370739eed41e46af716ac2”, opaque=“40426fa31b7377a7”, qop=auth, cnonce=“g5grhde0qqs4”, nc=00000001
Contact: sip:100@192.168.0.187;+sip.ice;reg-id=1;+sip.instance=“urn:uuid:8727177f-9e92-4f1b-aad8-baa6373b9f03”;expires=0
Expires: 0
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 3.0.13
Content-Length: 0
== Contact 100/sip:100@192.168.0.46:53063;transport=ws has been deleted
– Removed contact ‘sip:100@192.168.0.46:53063;transport=ws’ from AOR ‘100’ due to request
<— Transmitting SIP response (349 bytes) to WSS:192.168.0.46:53063 —>
SIP/2.0 200 OK
Via: SIP/2.0/WSS 192.168.0.187;rport=53063;received=192.168.0.46;branch=z9hG4bK7488576
Call-ID: 9d09al9nj4a7eimvhl6998
From: sip:100@192.168.0.187;tag=nq5o807dne
To: sip:100@192.168.0.187;tag=z9hG4bK7488576
CSeq: 4 REGISTER
Date: Tue, 31 Oct 2017 05:10:56 GMT
Expires: 0
Server: Asterisk PBX 15.0.0
Content-Length: 0
== Endpoint 100 is now Unreachable
== WebSocket connection from ‘192.168.0.46:53063’ closed
== WebSocket connection from ‘192.168.0.46:53106’ for protocol ‘sip’ accepted using version ‘13’
<— Received SIP request (518 bytes) from WSS:192.168.0.46:53106 —>
REGISTER sip:192.168.0.187 SIP/2.0
Via: SIP/2.0/WSS 192.168.0.187;branch=z9hG4bK2115142
Max-Forwards: 69
To: sip:100@192.168.0.187
From: sip:100@192.168.0.187;tag=7a2hdjqs77
Call-ID: ri3qbuga2qur2v9ot4cc84
CSeq: 1 REGISTER
Contact: sip:100@192.168.0.187;+sip.ice;reg-id=1;+sip.instance=“urn:uuid:46d11244-e6d3-44de-9f92-3a2b8c9bc768”;expires=300
Expires: 300
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 3.0.13
Content-Length: 0
<— Transmitting SIP response (457 bytes) to WSS:192.168.0.46:53106 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/WSS 192.168.0.187;rport=53106;received=192.168.0.46;branch=z9hG4bK2115142
Call-ID: ri3qbuga2qur2v9ot4cc84
From: sip:100@192.168.0.187;tag=7a2hdjqs77
To: sip:100@192.168.0.187;tag=z9hG4bK2115142
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1509426666/c0cd012030d4f6b5885243299622a9b2”,opaque=“0977a36460b77e8f”,algorithm=md5,qop="auth"
Server: Asterisk PBX 15.0.0
Content-Length: 0
<— Received SIP request (785 bytes) from WSS:192.168.0.46:53106 —>
REGISTER sip:192.168.0.187 SIP/2.0
Via: SIP/2.0/WSS 192.168.0.187;branch=z9hG4bK2894217
Max-Forwards: 69
To: sip:100@192.168.0.187
From: sip:100@192.168.0.187;tag=7a2hdjqs77
Call-ID: ri3qbuga2qur2v9ot4cc84
CSeq: 2 REGISTER
Authorization: Digest algorithm=MD5, username=“100”, realm=“asterisk”, nonce=“1509426666/c0cd012030d4f6b5885243299622a9b2”, uri=“sip:192.168.0.187”, response=“8e3629e06485fbb44f8b0f0420a67bab”, opaque=“0977a36460b77e8f”, qop=auth, cnonce=“r3n0ko99ral5”, nc=00000001
Contact: sip:100@192.168.0.187;+sip.ice;reg-id=1;+sip.instance=“urn:uuid:46d11244-e6d3-44de-9f92-3a2b8c9bc768”;expires=300
Expires: 300
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
Supported: path,gruu,outbound
User-Agent: JsSIP 3.0.13
Content-Length: 0
== Contact 100/sip:100@192.168.0.46:53106;transport=ws has been created
– Added contact ‘sip:100@192.168.0.46:53106;transport=ws’ to AOR ‘100’ with expiration of 300 seconds
<— Transmitting SIP response (415 bytes) to WSS:192.168.0.46:53106 —>
SIP/2.0 200 OK
Via: SIP/2.0/WSS 192.168.0.187;rport=53106;received=192.168.0.46;branch=z9hG4bK2894217
Call-ID: ri3qbuga2qur2v9ot4cc84
From: sip:100@192.168.0.187;tag=7a2hdjqs77
To: sip:100@192.168.0.187;tag=z9hG4bK2894217
CSeq: 2 REGISTER
Date: Tue, 31 Oct 2017 05:11:06 GMT
Contact: sip:100@192.168.0.46:53106;transport=ws;expires=299
Expires: 300
Server: Asterisk PBX 15.0.0
Content-Length: 0
== Endpoint 100 is now Reachable
– Contact 100/sip:100@192.168.0.46:53106;transport=ws is now Unknown. RTT: 0.000 msec