;====================template
endpoint-basic
type=endpoint
context=phones
disallow=all
allow=gsm,alaw,ulaw,g723
;device_state_busy_at=1
direct_media=yes
dtmf_mode=rfc4733
auth-userpass
type=auth
auth_type=userpass
aor-single-reg
type=aor
max_contacts=1
remove_existing=no
;===============EXTENSION 5000
5000
transport=transport-tls
media_encryption=sdes
media_encryption_optimistic=yes
auth=auth5000
aors=5000
auth5000
password=123
username=5000
5000
;===============EXTENSION 5001
5001
transport=simpletrans
auth=auth5001
aors=5001
auth5001
password=123
username=5001
5001
making the call from 5001 to 5000
<--- Received SIP request (2275 bytes) from UDP:192.168.133.1:53023 --->
PUBLISH sip:5001@192.168.133.99 SIP/2.0
Via: SIP/2.0/UDP 10.6.140.189:53023;rport;branch=z9hG4bKPj40162ab307154243abd74189ecfcf150
Max-Forwards: 70
From: "5001" <sip:5001@192.168.133.99>;tag=2a169eab133f4534873faeb737d03fc8
To: "5001" <sip:5001@192.168.133.99>
Call-ID: 5663bb452ee14dc997da5beec03c7143
CSeq: 1 PUBLISH
Event: presence
Expires: 600
User-Agent: Blink 3.2.0 (Windows)
Content-Type: application/pidf+xml
Content-Length: 1822
<?xml version='1.0' encoding='UTF-8'?>
<presence xmlns:agp-caps="urn:ag-projects:xml:ns:pidf:caps" xmlns:agp-pidf="urn:ag-projects:xml:ns:pidf" xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" xmlns:caps="urn:ietf:params:xml:ns:pidf:caps" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns="urn:ietf:params:xml:ns:pidf" entity="sip%3A5001%40192.168.133.99"><tuple id="SID-62a15cb2-6886-4748-a9f7-faca43ae7fa9"><status><basic>open</basic><agp-pidf:extended>busy</agp-pidf:extended></status><caps:servcaps><caps:audio>true</caps:audio><caps:message>true</caps:message><caps:text>false</caps:text><agp-caps:file-transfer>true</agp-caps:file-transfer><agp-caps:screen-sharing-server>true</agp-caps:screen-sharing-server><agp-caps:screen-sharing-client>true</agp-caps:screen-sharing-client></caps:servcaps><c:display-name>5001</c:display-name><agp-pidf:device-info id="62a15cb2-6886-4748-a9f7-faca43ae7fa9"><agp-pidf:description>John-PC</agp-pidf:description><agp-pidf:user-agent>Blink 3.2.0 (Windows)</agp-pidf:user-agent><agp-pidf:time-offset>120</agp-pidf:time-offset></agp-pidf:device-info><rpid:user-input idle-threshold="600">active</rpid:user-input><dm:deviceID>62a15cb2-6886-4748-a9f7-faca43ae7fa9</dm:deviceID><contact>sip%3A5001%40192.168.133.99</contact><note>On the phone</note><timestamp>2021-12-06T12:43:13.073534+02:00</timestamp></tuple><dm:person id="PID-d5ff37c66914ed204768cfa079568924"><rpid:activities><rpid:busy/></rpid:activities><dm:timestamp>2021-12-06T12:43:13.073534+02:00</dm:timestamp></dm:person><dm:device id="DID-62a15cb2-6886-4748-a9f7-faca43ae7fa9"><dm:deviceID>62a15cb2-6886-4748-a9f7-faca43ae7fa9</dm:deviceID><dm:note>Blink 3.2.0 (Windows) at John-PC</dm:note><dm:timestamp>2021-12-06T12:43:13.073534+02:00</dm:timestamp></dm:device></presence>
<--- Transmitting SIP response (569 bytes) to UDP:192.168.133.1:53023 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.6.140.189:53023;rport=53023;received=192.168.133.1;branch=z9hG4bKPj40162ab307154243abd74189ecfcf150
Call-ID: 5663bb452ee14dc997da5beec03c7143
From: "5001" <sip:5001@192.168.133.99>;tag=2a169eab133f4534873faeb737d03fc8
To: "5001" <sip:5001@192.168.133.99>;tag=z9hG4bKPj40162ab307154243abd74189ecfcf150
CSeq: 1 PUBLISH
WWW-Authenticate: Digest realm="asterisk",nonce="1638787392/ff8e9202f6fdb1e7b2b38c5b10349319",opaque="2e861b257056cce1",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.0.0-rc2
Content-Length: 0
<--- Received SIP request (2569 bytes) from UDP:192.168.133.1:53023 --->
PUBLISH sip:5001@192.168.133.99 SIP/2.0
Via: SIP/2.0/UDP 10.6.140.189:53023;rport;branch=z9hG4bKPjbbc9d189448e492e8d0dbc89ff0ee913
Max-Forwards: 70
From: "5001" <sip:5001@192.168.133.99>;tag=2a169eab133f4534873faeb737d03fc8
To: "5001" <sip:5001@192.168.133.99>
Call-ID: 5663bb452ee14dc997da5beec03c7143
CSeq: 2 PUBLISH
Event: presence
Expires: 600
User-Agent: Blink 3.2.0 (Windows)
Authorization: Digest username="5001", realm="asterisk", nonce="1638787392/ff8e9202f6fdb1e7b2b38c5b10349319", uri="sip:5001@192.168.133.99", response="6edc1900225ba589de816faf42a0523a", algorithm=md5, cnonce="42bf00ae441941a89c71ebe9419a27ed", opaque="2e861b257056cce1", qop=auth, nc=00000001
Content-Type: application/pidf+xml
Content-Length: 1822
<?xml version='1.0' encoding='UTF-8'?>
<presence xmlns:agp-caps="urn:ag-projects:xml:ns:pidf:caps" xmlns:agp-pidf="urn:ag-projects:xml:ns:pidf" xmlns:c="urn:ietf:params:xml:ns:pidf:cipid" xmlns:caps="urn:ietf:params:xml:ns:pidf:caps" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns="urn:ietf:params:xml:ns:pidf" entity="sip%3A5001%40192.168.133.99"><tuple id="SID-62a15cb2-6886-4748-a9f7-faca43ae7fa9"><status><basic>open</basic><agp-pidf:extended>busy</agp-pidf:extended></status><caps:servcaps><caps:audio>true</caps:audio><caps:message>true</caps:message><caps:text>false</caps:text><agp-caps:file-transfer>true</agp-caps:file-transfer><agp-caps:screen-sharing-server>true</agp-caps:screen-sharing-server><agp-caps:screen-sharing-client>true</agp-caps:screen-sharing-client></caps:servcaps><c:display-name>5001</c:display-name><agp-pidf:device-info id="62a15cb2-6886-4748-a9f7-faca43ae7fa9"><agp-pidf:description>John-PC</agp-pidf:description><agp-pidf:user-agent>Blink 3.2.0 (Windows)</agp-pidf:user-agent><agp-pidf:time-offset>120</agp-pidf:time-offset></agp-pidf:device-info><rpid:user-input idle-threshold="600">active</rpid:user-input><dm:deviceID>62a15cb2-6886-4748-a9f7-faca43ae7fa9</dm:deviceID><contact>sip%3A5001%40192.168.133.99</contact><note>On the phone</note><timestamp>2021-12-06T12:43:13.073534+02:00</timestamp></tuple><dm:person id="PID-d5ff37c66914ed204768cfa079568924"><rpid:activities><rpid:busy/></rpid:activities><dm:timestamp>2021-12-06T12:43:13.073534+02:00</dm:timestamp></dm:person><dm:device id="DID-62a15cb2-6886-4748-a9f7-faca43ae7fa9"><dm:deviceID>62a15cb2-6886-4748-a9f7-faca43ae7fa9</dm:deviceID><dm:note>Blink 3.2.0 (Windows) at John-PC</dm:note><dm:timestamp>2021-12-06T12:43:13.073534+02:00</dm:timestamp></dm:device></presence>
[Dec 6 10:43:12] WARNING[6790]: res_pjsip_pubsub.c:3345 pubsub_on_rx_publish_request: No registered publish handler for event presence from 5001
<--- Transmitting SIP response (420 bytes) to UDP:192.168.133.1:53023 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 10.6.140.189:53023;rport=53023;received=192.168.133.1;branch=z9hG4bKPjbbc9d189448e492e8d0dbc89ff0ee913
Call-ID: 5663bb452ee14dc997da5beec03c7143
From: "5001" <sip:5001@192.168.133.99>;tag=2a169eab133f4534873faeb737d03fc8
To: "5001" <sip:5001@192.168.133.99>;tag=z9hG4bKPjbbc9d189448e492e8d0dbc89ff0ee913
CSeq: 2 PUBLISH
Server: Asterisk PBX 18.0.0-rc2
Content-Length: 0
<--- Received SIP request (997 bytes) from UDP:192.168.133.1:53023 --->
INVITE sip:5000@192.168.133.99 SIP/2.0
Via: SIP/2.0/UDP 10.6.140.189:53023;rport;branch=z9hG4bKPj7328781e3c0544da98b95511f40c2643
Max-Forwards: 70
From: "5001" <sip:5001@192.168.133.99>;tag=01b6048e5fc443b3b2f0819327c7630b
To: <sip:5000@192.168.133.99>
Contact: <sip:29673158@192.168.133.1:53023>
Call-ID: 1871d9bd67bf42319d43614e373342a0
CSeq: 900 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.2.0 (Windows)
Content-Type: application/sdp
Content-Length: 427
v=0
o=- 3847783393 3847783393 IN IP4 192.168.133.1
s=Blink 3.2.0 (Windows)
t=0 0
m=audio 50018 RTP/AVP 113 9 0 8 101
c=IN IP4 192.168.133.1
a=rtcp:50019
a=rtpmap:113 opus/48000/2
a=fmtp:113 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=zrtp-hash:1.10 77429035c22b68889c4661a82a10adb3106ee9b3e2ed40699bdfb8435f5a8bbe
a=sendrecv
<--- Transmitting SIP response (563 bytes) to UDP:192.168.133.1:53023 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.6.140.189:53023;rport=53023;received=192.168.133.1;branch=z9hG4bKPj7328781e3c0544da98b95511f40c2643
Call-ID: 1871d9bd67bf42319d43614e373342a0
From: "5001" <sip:5001@192.168.133.99>;tag=01b6048e5fc443b3b2f0819327c7630b
To: <sip:5000@192.168.133.99>;tag=z9hG4bKPj7328781e3c0544da98b95511f40c2643
CSeq: 900 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1638787392/ff8e9202f6fdb1e7b2b38c5b10349319",opaque="2c482ada04940b0c",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.0.0-rc2
Content-Length: 0
<--- Received SIP request (416 bytes) from UDP:192.168.133.1:53023 --->
ACK sip:5000@192.168.133.99 SIP/2.0
Via: SIP/2.0/UDP 10.6.140.189:53023;rport;branch=z9hG4bKPj7328781e3c0544da98b95511f40c2643
Max-Forwards: 70
From: "5001" <sip:5001@192.168.133.99>;tag=01b6048e5fc443b3b2f0819327c7630b
To: <sip:5000@192.168.133.99>;tag=z9hG4bKPj7328781e3c0544da98b95511f40c2643
Call-ID: 1871d9bd67bf42319d43614e373342a0
CSeq: 900 ACK
User-Agent: Blink 3.2.0 (Windows)
Content-Length: 0
<--- Received SIP request (1291 bytes) from UDP:192.168.133.1:53023 --->
INVITE sip:5000@192.168.133.99 SIP/2.0
Via: SIP/2.0/UDP 10.6.140.189:53023;rport;branch=z9hG4bKPj143c4059bedb44db8b948660763a6145
Max-Forwards: 70
From: "5001" <sip:5001@192.168.133.99>;tag=01b6048e5fc443b3b2f0819327c7630b
To: <sip:5000@192.168.133.99>
Contact: <sip:29673158@192.168.133.1:53023>
Call-ID: 1871d9bd67bf42319d43614e373342a0
CSeq: 901 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
Supported: replaces, norefersub, gruu
User-Agent: Blink 3.2.0 (Windows)
Authorization: Digest username="5001", realm="asterisk", nonce="1638787392/ff8e9202f6fdb1e7b2b38c5b10349319", uri="sip:5000@192.168.133.99", response="d16b9d48d25f6702da59f2e21b4b7792", algorithm=md5, cnonce="9c36ecf3c6d34cb3b46ae1d7f7b14edf", opaque="2c482ada04940b0c", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 427
v=0
o=- 3847783393 3847783393 IN IP4 192.168.133.1
s=Blink 3.2.0 (Windows)
t=0 0
m=audio 50018 RTP/AVP 113 9 0 8 101
c=IN IP4 192.168.133.1
a=rtcp:50019
a=rtpmap:113 opus/48000/2
a=fmtp:113 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=zrtp-hash:1.10 77429035c22b68889c4661a82a10adb3106ee9b3e2ed40699bdfb8435f5a8bbe
a=sendrecv
== Setting global variable 'SIPDOMAIN' to '192.168.133.99'
<--- Transmitting SIP response (365 bytes) to UDP:192.168.133.1:53023 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.6.140.189:53023;rport=53023;received=192.168.133.1;branch=z9hG4bKPj143c4059bedb44db8b948660763a6145
Call-ID: 1871d9bd67bf42319d43614e373342a0
From: "5001" <sip:5001@192.168.133.99>;tag=01b6048e5fc443b3b2f0819327c7630b
To: <sip:5000@192.168.133.99>
CSeq: 901 INVITE
Server: Asterisk PBX 18.0.0-rc2
Content-Length: 0
-- Executing [5000@phones:1] Dial("PJSIP/5001-00000023", "PJSIP/5000") in new stack
-- Called PJSIP/5000
<--- Transmitting SIP request (1092 bytes) to TLS:192.168.133.1:55925 --->
INVITE sip:90354618@192.168.133.1:55925 SIP/2.0
Via: SIP/2.0/TLS 192.168.133.99:5061;rport;branch=z9hG4bKPj4378a878-39a9-449a-86f0-660eed799629;alias
From: "5001" <sip:5001@192.168.133.99>;tag=a9989993-30ab-44a3-a3e7-e579298378fe
To: <sip:90354618@192.168.133.1>
Contact: <sip:asterisk@192.168.133.99:5061;transport=TLS>
Call-ID: e28cff16-230e-403a-9909-b2f82650a9cd
CSeq: 16275 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 18.0.0-rc2
Content-Type: application/sdp
Content-Length: 394
v=0
o=- 356975371 356975371 IN IP4 192.168.133.99
s=Asterisk
c=IN IP4 192.168.133.99
t=0 0
m=audio 19818 RTP/AVP 8 0 3 4 101
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:SeyoCslBACq5od+7iyBKw6/TOrCHqDzFFrfb6ifZ
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:4 G723/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv