Block certain anonymous calls

#1

I have a video door phone that uses sip. When someone rings the bell it is supposed to call 601.

The problem that I am facing is the doorbell initiates two calls one for its own protocol with the help of which the indoor monitor can work even without the Asterisk. I was using chan_sip initially and that was not having any issue. After shifting to chan_pjsip I am having a problem that there are two calls placed from the doorphone. One is annoymus annd the other is from the doorphone extension 161.

[default]

exten => 601,n,Dial(PJSIP/101&PJSIP/102&PJSIP/103&PJSIP/104&PJSIP/105&PJSIP/106&PJSIP/107&PJSIP/108&PJSIP/109&PJSIP/110&PJSIP/111&PJSIP/112&PJSIP/113&PJSIP/114&PJSIP/115&PJSIP/116&Local/mobilephones@default)


PJSIP Logging enabled
<--- Received SIP request (497 bytes) from UDP:192.168.1.161:5060 --->
MESSAGE sip:601@asterisk SIP/2.0
Via: SIP/2.0/UDP 192.168.1.161:5060;rport;branch=z9hG4bK1515420870
From: <sip:161@asterisk>;tag=1057883902
To: <sip:601@asterisk>
Call-ID: 1942807761
CSeq: 20 MESSAGE
Content-Type: text/plain
Max-Forwards: 70
User-Agent: DnakeVoip v1.0
Content-Length:   194

<params>
	<app>talk</app>
	<event>host2id</event>
	<event_url>/talk/host2id</event_url>
	<host>161</host>
	<building>1</building>
	<unit>1</unit>
	<floor>0</floor>
	<family>1</family>
</params>

<--- Transmitting SIP response (446 bytes) to UDP:192.168.1.161:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.161:5060;rport=5060;received=192.168.1.161;branch=z9hG4bK1515420870
Call-ID: 1942807761
From: <sip:161@asterisk>;tag=1057883902
To: <sip:601@asterisk>;tag=z9hG4bK1515420870
CSeq: 20 MESSAGE
WWW-Authenticate: Digest  realm="asterisk",nonce="1554196790/5def8c5c4b7f994994e73872eb6fecb1",opaque="6409680820158f24",algorithm=md5,qop="auth"
Server: Asterisk PBX 15.2.2
Content-Length:  0


<--- Received SIP request (773 bytes) from UDP:192.168.1.161:5060 --->
INVITE sip:601@asterisk SIP/2.0
Via: SIP/2.0/UDP 192.168.1.161:5060;rport;branch=z9hG4bK1565047092
From: <sip:161@asterisk>;tag=69824255
To: <sip:601@asterisk>
Call-ID: 1753293872
CSeq: 20 INVITE
Contact: <sip:161@192.168.1.161:5060>
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: DnakeVoip v1.0
Content-Length:   430

v=0
o=dnake 1553834900 1553834900 IN IP4 192.168.1.161
s=dnake
c=IN IP4 192.168.1.161
t=0 0
m=audio 6000 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-11
a=sendrecv
m=video 6200 RTP/AVP 104
a=rtpmap:104 H264/90000
a=fmtp:104 profile-level-id=4D0029; packetization-mode=1
a=ex_fmtp:104 2CIF=1
a=ex_multicast:104 ip=238.9.1.161; port=6300
a=sendrecv

<--- Transmitting SIP response (443 bytes) to UDP:192.168.1.161:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.161:5060;rport=5060;received=192.168.1.161;branch=z9hG4bK1565047092
Call-ID: 1753293872
From: <sip:161@asterisk>;tag=69824255
To: <sip:601@asterisk>;tag=z9hG4bK1565047092
CSeq: 20 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1554196790/5def8c5c4b7f994994e73872eb6fecb1",opaque="6cafe9741c002349",algorithm=md5,qop="auth"
Server: Asterisk PBX 15.2.2
Content-Length:  0


<--- Received SIP request (759 bytes) from UDP:192.168.1.161:5060 --->
MESSAGE sip:601@asterisk SIP/2.0
Via: SIP/2.0/UDP 192.168.1.161:5060;rport;branch=z9hG4bK1216023852
From: <sip:161@asterisk>;tag=1057883902
To: <sip:601@asterisk>
Call-ID: 1942807761
CSeq: 21 MESSAGE
Authorization: Digest username="161", realm="asterisk", nonce="1554196790/5def8c5c4b7f994994e73872eb6fecb1", uri="sip:601@asterisk", response="364a34d5160cb35eadaf23bab4614f6a", algorithm=MD5, cnonce="0a4f113b", opaque="6409680820158f24", qop=auth, nc=00000001
Content-Type: text/plain
Max-Forwards: 70
User-Agent: DnakeVoip v1.0
Content-Length:   194

<params>
	<app>talk</app>
	<event>host2id</event>
	<event_url>/talk/host2id</event_url>
	<host>161</host>
	<building>1</building>
	<unit>1</unit>
	<floor>0</floor>
	<family>1</family>
</params>

<--- Received SIP request (269 bytes) from UDP:192.168.1.161:5060 --->
ACK sip:601@asterisk SIP/2.0
Via: SIP/2.0/UDP 192.168.1.161:5060;rport;branch=z9hG4bK1565047092
Route: <sip:192.168.1.18;lr>
From: <sip:161@asterisk>;tag=69824255
To: <sip:601@asterisk>;tag=z9hG4bK1565047092
Call-ID: 1753293872
CSeq: 20 ACK
Content-Length: 0


<--- Transmitting SIP response (295 bytes) to UDP:192.168.1.161:5060 --->
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 192.168.1.161:5060;rport=5060;received=192.168.1.161;branch=z9hG4bK1216023852
Call-ID: 1942807761
From: <sip:161@asterisk>;tag=1057883902
To: <sip:601@asterisk>;tag=z9hG4bK1216023852
CSeq: 21 MESSAGE
Server: Asterisk PBX 15.2.2
Content-Length:  0


    -- Executing [601@default:1] NoOp("Message/ast_msg_queue", "EXECUTING 601 call") in new stack
    -- Executing [601@default:2] Dial("Message/ast_msg_queue", "PJSIP/101&PJSIP/102&PJSIP/103&PJSIP/104&PJSIP/105&PJSIP/106&PJSIP/107&PJSIP/108&PJSIP/109&PJSIP/110&PJSIP/111&PJSIP/112&PJSIP/113&PJSIP/114&PJSIP/115&PJSIP/116&Local/mobilephones@default") in new stack
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '101': Could not create dialog to invalid URI '101'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '101'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
<--- Received SIP request (1034 bytes) from UDP:192.168.1.161:5060 --->
INVITE sip:601@asterisk SIP/2.0
Via: SIP/2.0/UDP 192.168.1.161:5060;rport;branch=z9hG4bK365732804
From: <sip:161@asterisk>;tag=69824255
To: <sip:601@asterisk>
Call-ID: 1753293872
CSeq: 21 INVITE
Contact: <sip:161@192.168.1.161:5060>
Authorization: Digest username="161", realm="asterisk", nonce="1554196790/5def8c5c4b7f994994e73872eb6fecb1", uri="sip:601@asterisk", response="c0a0e198fec2d4826579bc2903cf5b3f", algorithm=MD5, cnonce="0a4f113b", opaque="6cafe9741c002349", qop=auth, nc=00000001
Content-Type: application/sdp
Max-Forwards: 70
User-Agent: DnakeVoip v1.0
Content-Length:   430

v=0
o=dnake 1553834900 1553834900 IN IP4 192.168.1.161
s=dnake
c=IN IP4 192.168.1.161
t=0 0
m=audio 6000 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-11
a=sendrecv
m=video 6200 RTP/AVP 104
a=rtpmap:104 H264/90000
a=fmtp:104 profile-level-id[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '104': Could not create dialog to invalid URI '104'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '104'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
  == Setting global variable 'SIPDOMAIN' to 'asterisk'
<--- Transmitting SIP response (267 bytes) to UDP:192.168.1.161:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.161:5060;rport=5060;received=192.168.1.161;branch=z9hG4bK365732804
Call-ID: 1753293872
From: <sip:161@asterisk>;tag=69824255
To: <sip:601@asterisk>
CSeq: 21 INVITE
Server: Asterisk PBX 15.2.2
Content-Length:  0


[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '105': Could not create dialog to invalid URI '105'.  Is endpoint registered and reachable?
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '105'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
  == Using SIP RTP Video TOS bits 136
  == Using SIP RTP Video TOS bits 136 in TCLASS field.
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '106': Could not create dialog to invalid URI '106'.  Is endpoint registered and reachable?
    -- Executing [601@default:1] NoOp("PJSIP/161-000000ba", "EXECUTING 601 call") in new stack
    -- Executing [601@default:2] Dial("PJSIP/161-000000ba", "PJSIP/101&PJSIP/102&PJSIP/103&PJSIP/104&PJSIP/105&PJSIP/106&PJSIP/107&PJSIP/108&PJSIP/109&PJSIP/110&PJSIP/111&PJSIP/112&PJSIP/113&PJSIP/114&PJSIP/115&PJSIP/116&Local/mobilephones@default") in new stack
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '106'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '107': Could not create dialog to invalid URI '107'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '107'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '108': Could not create dialog to invalid URI '108'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '108'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '109': Could not create dialog to invalid URI '109'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '109'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '110': Could not create dialog to invalid URI '110'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '110'
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '101': Could not create dialog to invalid URI '101'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '101'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '111': Could not create dialog to invalid URI '111'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '111'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '112': Could not create dialog to invalid URI '112'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '112'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '113': Could not create dialog to invalid URI '113'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '113'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '114': Could not create dialog to invalid URI '114'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '114'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '115': Could not create dialog to invalid URI '115'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '115'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '116': Could not create dialog to invalid URI '116'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '116'
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[2745][C-00000001]: translate.c:1358 ast_translator_best_choice: Cannot determine best translation path since one capability supports no formats
[Apr  2 09:19:50] WARNING[2745][C-00000001]: channel.c:6120 request_channel: No translator path exists for channel type Local (native (codec2|g723|ulaw|alaw|gsm|g726|g726aal2|adpcm|slin|slin|slin|slin|slin|slin|slin|slin|slin|lpc10|g729|speex|speex|speex|ilbc|g722|siren7|siren14|testlaw|g719|opus|jpeg|png|h261|h263|h263p|h264|mpeg4|vp8|vp9|red|t140|t38|silk|silk|silk|silk)) to (nothing)
[Apr  2 09:19:50] WARNING[2745][C-00000001]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'Local' (cause 58 - Bearer capability not available)
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
  == Using SIP RTP Video TOS bits 136
  == Using SIP RTP Video TOS bits 136 in TCLASS field.
    -- Called PJSIP/102
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
    -- Called PJSIP/103
  == Using SIP RTP Video TOS bits 136
  == Using SIP RTP Video TOS bits 136 in TCLASS field.
    -- PJSIP/103-000000b9 connected line has changed. Saving it until answer for Message/ast_msg_queue
<--- Transmitting SIP request (1142 bytes) to UDP:192.168.1.243:54583 --->
INVITE sip:103@192.168.1.243:54583 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.18:5060;rport;branch=z9hG4bKPjc26dff16-83a8-486f-9c90-a18b4dd78c78
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=d628cfe8-e045-4f5e-a262-8cbec0ec7489
To: <sip:103@192.168.1.243>
Contact: <sip:asterisk@192.168.1.18:5060>
Call-ID: ed974515-9563-4a8c-9889-f5b520e02ba8
CSeq: 30497 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 15.2.2
Content-Type: application/sdp
Content-Length:   469

v=0
o=- 1048728448 1048728448 IN IP4 192.168.1.18
s=Asterisk
c=IN IP4 192.168.1.18
t=0 0
m=audio 35104 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-e<--- Transmitting SIP request (1139 bytes) to UDP:192.168.1.236:5064 --->
INVITE sip:102@192.168.1.236:5064 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.18:5060;rport;branch=z9hG4bKPjb083ae9a-700a-437d-8d52-b6e0c0d98d7d
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=9003d673-da48-41f5-b4f9-e3d92a8a045f
To: <sip:102@192.168.1.236>
Contact: <sip:asterisk@192.168.1.18:5060>
Call-ID: 13decb8d-401d-4e1c-b6d1-6e436492a180
CSeq: 24199 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 15.2.2
Content-Type: application/sdp
Content-Length:   467

v=0
o=- 482859899 482859899 IN IP4 192.168.1.18
s=Asterisk
c=IN IP4 192.168.1.18
t=0 0
m=audio 34878 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event    -- PJSIP/102-000000b8 connected line has changed. Saving it until answer for Message/ast_msg_queue
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '104': Could not create dialog to invalid URI '104'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '104'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '105': Could not create dialog to invalid URI '105'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '105'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '106': Could not create dialog to invalid URI '106'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '106'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '107': Could not create dialog to invalid URI '107'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '107'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[24758]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '108': Could not create dialog to invalid URI '108'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[24758]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '108'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[24758]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '109': Could not create dialog to invalid URI '109'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[24758]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '109'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[24758]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '110': Could not create dialog to invalid URI '110'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[24758]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '110'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[24758]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '111': Could not create dialog to invalid URI '111'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[24758]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '111'
<--- Received SIP response (503 bytes) from UDP:192.168.1.236:5064 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPjb083ae9a-700a-437d-8d52-b6e0c0d98d7d
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=9003d673-da48-41f5-b4f9-e3d92a8a045f
To: <sip:102@192.168.1.236>
Call-ID: 13decb8d-401d-4e1c-b6d1-6e436492a180
CSeq: 24199 INVITE
Supported: replaces, path, eventlist
User-Agent: Grandstream GXV3275 1.0.3.207
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '112': Could not create dialog to invalid URI '112'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '112'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '113': Could not create dialog to invalid URI '113'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '113'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[12748]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '114': Could not create dialog to invalid URI '114'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[12748]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '114'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '115': Could not create dialog to invalid URI '115'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '115'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
[Apr  2 09:19:50] ERROR[23109]: res_pjsip.c:3163 ast_sip_create_dialog_uac: Endpoint '116': Could not create dialog to invalid URI '116'.  Is endpoint registered and reachable?
[Apr  2 09:19:50] ERROR[23109]: chan_pjsip.c:2475 request: Failed to create outgoing session to endpoint '116'
[Apr  2 09:19:50] WARNING[25266][C-00000038]: app_dial.c:2510 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
    -- Called PJSIP/102
  == Using SIP RTP Audio TOS bits 184
  == Using SIP RTP Audio TOS bits 184 in TCLASS field.
  == Using SIP RTP Video TOS bits 136
  == Using SIP RTP Video TOS bits 136 in TCLASS field.
    -- Called PJSIP/103
    -- Called Local/mobilephones@default
    -- Executing [mobilephones@default:1] Ringing("Local/mobilephones@default-0000001d;2", "") in new stack
  == Using SIP RTP Video TOS bits 136
  == Using SIP RTP Video TOS bits 136 in TCLASS field.
    -- Executing [mobilephones@default:2] System("Local/mobilephones@default-0000001d;2", "/bin/sleep 6") in new stack
    -- PJSIP/102-000000bb connected line has changed. Saving it until answer for PJSIP/161-000000ba
    -- Local/mobilephones@default-0000001d;1 is ringing
<--- Transmitting SIP response (454 bytes) to UDP:192.168.1.161:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.161:5060;rport=5060;received=192.168.1.161;branch=z9hG4bK365732804
Call-ID: 1753293872
From: <sip:161@asterisk>;tag=69824255
To: <sip:601@asterisk>;tag=4b6d3cbd-6020-4f34-ae3b-db0812529718
CSeq: 21 INVITE
Server: Asterisk PBX 15.2.2
Contact: <sip:192.168.1.18:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Content-Length:  0


    -- PJSIP/103-000000bc connected line has changed. Saving it until answer for PJSIP/161-000000ba
<--- Transmitting SIP request (1094 bytes) to UDP:192.168.1.243:54583 --->
INVITE sip:103@192.168.1.243:54583 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.18:5060;rport;branch=z9hG4bKPjb1423509-4f17-4c1d-b151-d8a4d73285c2
From: "161" <sip:Main_door@192.168.1.18>;tag=a6474041-3b14-48e9-9c99-9d566c641b75
To: <sip:103@192.168.1.243>
Contact: <sip:asterisk@192.168.1.18:5060>
Call-ID: 91de4ca1-4a14-4208-b7b2-8c97bc44be7b
CSeq: 32140 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: "161" <sip:Main_door@192.168.1.18>
Max-Forwards: 70
User-Agent: Asterisk PBX 15.2.2
Content-Type: application/sdp
Content-Length:   375

v=0
o=- 790870005 790870005 IN IP4 192.168.1.18
s=Asterisk
c=IN IP4 192.168.1.18
t=0 0
m=audio 38192 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpma<--- Transmitting SIP request (1092 bytes) to UDP:192.168.1.236:5064 --->
INVITE sip:102@192.168.1.236:5064 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.18:5060;rport;branch=z9hG4bKPj700a280e-98ba-40a2-a69f-61f424371b7d
From: "161" <sip:Main_door@192.168.1.18>;tag=7aa17525-f030-431c-a7cf-2d3d6b9003fe
To: <sip:102@192.168.1.236>
Contact: <sip:asterisk@192.168.1.18:5060>
Call-ID: 519c691b-61fc-40fc-a5e9-8bf119b968f2
CSeq: 4556 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: "161" <sip:Main_door@192.168.1.18>
Max-Forwards: 70
User-Agent: Asterisk PBX 15.2.2
Content-Type: application/sdp
Content-Length:   375

v=0
o=- 753944810 753944810 IN IP4 192.168.1.18
s=Asterisk
c=IN IP4 192.168.1.18
t=0 0
m=audio 30542 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:1<--- Received SIP response (491 bytes) from UDP:192.168.1.236:5064 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPj700a280e-98ba-40a2-a69f-61f424371b7d
From: "161" <sip:Main_door@192.168.1.18>;tag=7aa17525-f030-431c-a7cf-2d3d6b9003fe
To: <sip:102@192.168.1.236>
Call-ID: 519c691b-61fc-40fc-a5e9-8bf119b968f2
CSeq: 4556 INVITE
Supported: replaces, path, eventlist
User-Agent: Grandstream GXV3275 1.0.3.207
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Received SIP response (591 bytes) from UDP:192.168.1.236:5064 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPjb083ae9a-700a-437d-8d52-b6e0c0d98d7d
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=9003d673-da48-41f5-b4f9-e3d92a8a045f
To: <sip:102@192.168.1.236>;tag=1054244180
Call-ID: 13decb8d-401d-4e1c-b6d1-6e436492a180
CSeq: 24199 INVITE
Contact: <sip:102@192.168.1.236:5064>
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream GXV3275 1.0.3.207
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


    -- PJSIP/102-000000b8 is ringing
<--- Received SIP response (578 bytes) from UDP:192.168.1.236:5064 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPj700a280e-98ba-40a2-a69f-61f424371b7d
From: "161" <sip:Main_door@192.168.1.18>;tag=7aa17525-f030-431c-a7cf-2d3d6b9003fe
To: <sip:102@192.168.1.236>;tag=184018702
Call-ID: 519c691b-61fc-40fc-a5e9-8bf119b968f2
CSeq: 4556 INVITE
Contact: <sip:102@192.168.1.236:5064>
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream GXV3275 1.0.3.207
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


    -- PJSIP/102-000000bb is ringing
<--- Received SIP response (499 bytes) from UDP:192.168.1.243:54583 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPjc26dff16-83a8-486f-9c90-a18b4dd78c78
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=d628cfe8-e045-4f5e-a262-8cbec0ec7489
To: <sip:103@192.168.1.243>
Call-ID: ed974515-9563-4a8c-9889-f5b520e02ba8
CSeq: 30497 INVITE
Supported: replaces, path, eventlist
User-Agent: Grandstream Wave 1.0.3.26
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Received SIP response (488 bytes) from UDP:192.168.1.243:54583 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPjb1423509-4f17-4c1d-b151-d8a4d73285c2
From: "161" <sip:Main_door@192.168.1.18>;tag=a6474041-3b14-48e9-9c99-9d566c641b75
To: <sip:103@192.168.1.243>
Call-ID: 91de4ca1-4a14-4208-b7b2-8c97bc44be7b
CSeq: 32140 INVITE
Supported: replaces, path, eventlist
User-Agent: Grandstream Wave 1.0.3.26
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Received SIP response (588 bytes) from UDP:192.168.1.243:54583 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPjc26dff16-83a8-486f-9c90-a18b4dd78c78
From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=d628cfe8-e045-4f5e-a262-8cbec0ec7489
To: <sip:103@192.168.1.243>;tag=1148571086
Call-ID: ed974515-9563-4a8c-9889-f5b520e02ba8
CSeq: 30497 INVITE
Contact: <sip:103@192.168.1.243:54583>
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.0.3.26
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


    -- PJSIP/103-000000b9 is ringing
<--- Received SIP response (577 bytes) from UDP:192.168.1.243:54583 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.18:5060;rport=5060;branch=z9hG4bKPjb1423509-4f17-4c1d-b151-d8a4d73285c2
From: "161" <sip:Main_door@192.168.1.18>;tag=a6474041-3b14-48e9-9c99-9d566c641b75
To: <sip:103@192.168.1.243>;tag=1037328968
Call-ID: 91de4ca1-4a14-4208-b7b2-8c97bc44be7b
CSeq: 32140 INVITE
Contact: <sip:103@192.168.1.243:54583>
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream Wave 1.0.3.26
Allow-Events: talk, hold
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


    -- PJSIP/103-000000bc is ringing
<--- Received SIP request (300 bytes) from UDP:192.168.1.161:5060 --->
OPTIONS sip:192.168.1.18 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.161:5060;rport;branch=z9hG4bK981381306
From: <sip:161@192.168.1.18>;tag=452779857
To: <sip:192.168.1.18>
Call-ID: 1849217048
CSeq: 20 OPTIONS
Accept: application/sdp
Max-Forwards: 70
User-Agent: DnakeVoip v1.0
Content-Length: 0
0 Likes

#2

The Pjsip history is as below

No.   Timestamp  (Dir) Address                  SIP Message                        
===== ========== ============================== ===================================
00000 1554202564 * <== 192.168.1.249:5060       OPTIONS sip:192.168.1.18 SIP/2.0
00001 1554202564 * ==> 192.168.1.249:5060       SIP/2.0 401 Unauthorized
00002 1554202564 * <== 192.168.1.249:5060       OPTIONS sip:192.168.1.18 SIP/2.0
00003 1554202564 * ==> 192.168.1.249:5060       SIP/2.0 200 OK
00004 1554202566 * ==> 192.168.1.161:5060       OPTIONS sip:161@192.168.1.161:5060;line=b30762b596d55e0 SIP/2.0
00005 1554202566 * <== 192.168.1.161:5060       SIP/2.0 200 OK
00006 1554202567 * <== 192.168.1.161:5060       MESSAGE sip:601@asterisk SIP/2.0
00007 1554202567 * ==> 192.168.1.161:5060       SIP/2.0 401 Unauthorized
00008 1554202567 * <== 192.168.1.161:5060       INVITE sip:601@asterisk SIP/2.0
00009 1554202567 * ==> 192.168.1.161:5060       SIP/2.0 401 Unauthorized
00010 1554202567 * <== 192.168.1.161:5060       MESSAGE sip:601@asterisk SIP/2.0
00011 1554202567 * <== 192.168.1.161:5060       ACK sip:601@asterisk SIP/2.0
00012 1554202567 * ==> 192.168.1.161:5060       SIP/2.0 202 Accepted
00013 1554202567 * <== 192.168.1.161:5060       INVITE sip:601@asterisk SIP/2.0
00014 1554202567 * ==> 192.168.1.161:5060       SIP/2.0 100 Trying
00015 1554202567 * ==> 192.168.1.236:5064       INVITE sip:102@192.168.1.236:5064 SIP/2.0
00016 1554202567 * <== 192.168.1.236:5064       SIP/2.0 100 Trying
00017 1554202567 * ==> 192.168.1.243:55135      INVITE sip:103@192.168.1.243:55135 SIP/2.0
00018 1554202567 * <== 192.168.1.236:5064       SIP/2.0 180 Ringing
00019 1554202567 * ==> 192.168.1.236:5064       INVITE sip:102@192.168.1.236:5064 SIP/2.0
00020 1554202567 * ==> 192.168.1.243:55135      INVITE sip:103@192.168.1.243:55135 SIP/2.0
00021 1554202567 * <== 192.168.1.236:5064       SIP/2.0 100 Trying
00022 1554202567 * ==> 192.168.1.161:5060       SIP/2.0 180 Ringing
00023 1554202567 * <== 192.168.1.236:5064       SIP/2.0 180 Ringing
00024 1554202567 * <== 192.168.1.243:55135      SIP/2.0 100 Trying
00025 1554202567 * <== 192.168.1.243:55135      SIP/2.0 100 Trying
00026 1554202567 * <== 192.168.1.243:55135      SIP/2.0 180 Ringing
00027 1554202567 * <== 192.168.1.243:55135      SIP/2.0 180 Ringing
00028 1554202579 * <== 192.168.1.243:55135      SIP/2.0 486 Busy Here
00029 1554202579 * ==> 192.168.1.243:55135      ACK sip:103@192.168.1.243:55135 SIP/2.0
00030 1554202580 * <== 192.168.1.161:5060       CANCEL sip:601@asterisk SIP/2.0
00031 1554202580 * ==> 192.168.1.161:5060       SIP/2.0 200 OK
00032 1554202580 * ==> 192.168.1.161:5060       SIP/2.0 487 Request Terminated
00033 1554202580 * ==> 192.168.1.236:5064       CANCEL sip:102@192.168.1.236:5064 SIP/2.0
00034 1554202580 * ==> 192.168.1.243:55135      CANCEL sip:103@192.168.1.243:55135 SIP/2.0
00035 1554202580 * <== 192.168.1.236:5064       SIP/2.0 200 OK
00036 1554202580 * <== 192.168.1.236:5064       SIP/2.0 487 Request Terminated
00037 1554202580 * ==> 192.168.1.236:5064       ACK sip:102@192.168.1.236:5064 SIP/2.0
00038 1554202580 * <== 192.168.1.161:5060       ACK sip:601@asterisk SIP/2.0
00039 1554202580 * <== 192.168.1.243:55135      SIP/2.0 200 OK
00040 1554202580 * <== 192.168.1.243:55135      SIP/2.0 487 Request Terminated
00041 1554202580 * ==> 192.168.1.243:55135      ACK sip:103@192.168.1.243:55135 SIP/2.0
00042 1554202584 * <== 192.168.1.161:5060       OPTIONS sip:192.168.1.18 SIP/2.0
00043 1554202584 * ==> 192.168.1.161:5060       SIP/2.0 401 Unauthorized
00044 1554202584 * <== 192.168.1.161:5060       OPTIONS sip:192.168.1.18 SIP/2.0
00045 1554202584 * ==> 192.168.1.161:5060       SIP/2.0 200 OK
00046 1554202585 * <== 192.168.1.236:5064       SIP/2.0 200 OK
00047 1554202585 * ==> 192.168.1.236:5064       ACK sip:102@192.168.1.236:5064 SIP/2.0
00048 1554202585 * ==> 192.168.1.236:5064       BYE sip:102@192.168.1.236:5064 SIP/2.0
00049 1554202585 * <== 192.168.1.236:5064       SIP/2.0 200 OK
0 Likes

#3

You can use the message_context[1] endpoint option to direct the MESSAGE requests to another context that does nothing instead.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk13Configuration_res_pjsip-endpoint_message_context

0 Likes

#4

Should I add the message_context=some_context_that_does_nothing in all the endpoints?

0 Likes

#5

The option only needs to be added to the endpoint for the door phone. The problem isn’t the anonymous outgoing call. That’s the consequence of the MESSAGE coming in. Route the MESSAGE differently, and the call will never happen.

0 Likes

#6

I have endpoint 161 that is used by the doorphone to make calls. The doorphone is set to call 601 which is not an endpoint rather its a sort of ring group in extensions.conf and it dials 101->116.

0 Likes

#7

Then you would add it to the configuration for the 161 endpoint.

0 Likes

#8

That solves the issue.

Thanks alot

0 Likes