CID match not working in Asterisk 16

I have a dialplan in which I want to mach a CID and only EXT 100 could call EXT 200:

This is part of my diaplan:

[from-internal]
exten => 200/_100,1,Answer

CLI> dialplan show from-internal
[ Context 'from-internal' created by 'pbx_config' ]
'200' (CID match '100') => 1. Answer() [extensions.conf:51]

But when I try to call EXT 200 from EXT 100 then I see only this in the logs:

<--- Transmitting SIP response (390 bytes) to UDP:192.168.1.5:1148 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.4.0.4:59393;rport=1148;received=192.168.1.5;branch=z9hG4bKPj603e06e2a9ed45148437ea023a98150d
Call-ID: 4332612596464e4ba1870978086c3048
From: <sip:100@192.168.1.10>;tag=42b84d77e61b44228b083efe4ccfd797
To: <sip:200@192.168.1.10>;tag=753b9c65-6b0f-4bf4-ab37-41e6d34b9f61
CSeq: 23570 INVITE
Server: Asterisk PBX 16.7.0
Content-Length: 0

<--- Received SIP request (365 bytes) from UDP:192.168.1.5:1148 --->
ACK sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPj603e06e2a9ed45148437ea023a98150d
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=42b84d77e61b44228b083efe4ccfd797
To: <sip:200@192.168.1.10>;tag=753b9c65-6b0f-4bf4-ab37-41e6d34b9f61
Call-ID: 4332612596464e4ba1870978086c3048
CSeq: 23570 ACK
Content-Length: 0

I have Asterisk 16.7.0 with pjsip.

I think you need a “pattern” according to this: https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching#PatternMatching-MatchingonCallerID

Does 200/_100 work?

Show your pjsip settings for endpoint 200.

Is it directed to the ‘from-internal’ context?

Are the calls being matched as being from the endpoint?

No not at all, I pasted without _ but I’ve got underscore in this place.

Context is ok, when I remove /_100 then I can reach 200 extension.

post the Asterisk CLI log when dialing beside the of the SIP trace and trace should start with an INVITE request

This is my dialplan when extension 100 can call extension 200:

[from-internal]
exten => 200,1,Answer
 same => n,Verbose(CID ${CALLERID(num)})
 same => n,Wait(1)
 same => n,Read(SPYNUM,extension,3,,,60)
 same => n,ExecIf($[${SPYNUM}>99]?ChanSpy(PJSIP/${SPYNUM}))
 same => n,Verbose(MONITOR ${SPYNUM})
 same => n,Hangup

And the output in the CLI looks like this (pjsip set logger on, core set verbose 9, core set debug 9):

<--- Received SIP request (1407 bytes) from UDP:192.168.1.5:17745 --->
INVITE sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPje2c37a16b48e4530a4402f605134e568
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>
Contact: <sip:100@10.4.0.4:59393;ob>
Call-ID: 33553bc5117a4c81845b7c07613814d2
CSeq: 26943 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.19.26
Content-Type: application/sdp
Content-Length:   792

v=0
o=- 3790999808 3790999808 IN IP4 172.23.16.6
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4004 RTP/AVP 96 97 98 99 3 0 8 9 100 102 103 101 104 105
c=IN IP4 172.23.16.6
b=TIAS:64000
a=rtcp:4005 IN IP4 172.23.16.6
a=sendrecv
a=rtpmap:96 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:98 speex/32000
a=rtpmap:99 iLBC/8000
a=fmtp:99 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:100 AMR/8000
a=fmtp:100 octet-align=1
a=rtpmap:102 SILK/16000
a=fmtp:102 useinbandfec=0
a=rtpmap:103 SILK/8000
a=fmtp:103 useinbandfec=0
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=rtpmap:104 telephone-event/8000
a=fmtp:104 0-16
a=rtpmap:105 telephone-event/32000
a=fmtp:105 0-16
a=ssrc:245587398 cname:68d939ce32f47422

<--- Transmitting SIP response (545 bytes) to UDP:192.168.1.5:17745 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.4.0.4:59393;rport=17745;received=192.168.1.5;branch=z9hG4bKPje2c37a16b48e4530a4402f605134e568
Call-ID: 33553bc5117a4c81845b7c07613814d2
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>;tag=z9hG4bKPje2c37a16b48e4530a4402f605134e568
CSeq: 26943 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1582007353/44a17d76170265b41a2367aa31f3dbb3",opaque="67a2f94627afd30c",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP request (370 bytes) from UDP:192.168.1.5:17745 --->
ACK sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPje2c37a16b48e4530a4402f605134e568
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>;tag=z9hG4bKPje2c37a16b48e4530a4402f605134e568
Call-ID: 33553bc5117a4c81845b7c07613814d2
CSeq: 26943 ACK
Content-Length:  0


<--- Received SIP request (1700 bytes) from UDP:192.168.1.5:17745 --->
INVITE sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPj47222f5cbbcf446f9fd2657dfb1a145c
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>
Contact: <sip:100@10.4.0.4:59393;ob>
Call-ID: 33553bc5117a4c81845b7c07613814d2
CSeq: 26944 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.19.26
Authorization: Digest username="100", realm="asterisk", nonce="1582007353/44a17d76170265b41a2367aa31f3dbb3", uri="sip:200@192.168.1.10", response="9cb204e33906893c1ea500c9e27a9bab", algorithm=md5, cnonce="9464c08b80494683a24e36d23b7b9d8f", opaque="67a2f94627afd30c", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   792

v=0
o=- 3790999808 3790999808 IN IP4 172.23.16.6
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4004 RTP/AVP 96 97 98 99 3 0 8 9 100 102 103 101 104 105
c=IN IP4 172.23.16.6
b=TIAS:64000
a=rtcp:4005 IN IP4 172.23.16.6
a=sendrecv
a=rtpmap:96 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:98 speex/32000
a=rtpmap:99 iLBC/8000
a=fmtp:99 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:100 AMR/8000
a=fmtp:100 octet-align=1
a=rtpmap:102 SILK/16000
a=fmtp:102 useinbandfec=0
a=rtpmap:103 SILK/8000
a=fmtp:103 useinbandfec=0
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=rtpmap:104 telephone-event/8000
a=fmtp:104 0-16
a=rtpmap:105 telephone-event/32000
a=fmtp:105 0-16
a=ssrc:245587398 cname:68d939ce32f47422

  == Setting global variable 'SIPDOMAIN' to '192.168.1.10'
<--- Transmitting SIP response (347 bytes) to UDP:192.168.1.5:17745 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.4.0.4:59393;rport=17745;received=192.168.1.5;branch=z9hG4bKPj47222f5cbbcf446f9fd2657dfb1a145c
Call-ID: 33553bc5117a4c81845b7c07613814d2
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>
CSeq: 26944 INVITE
Server: Asterisk PBX 16.7.0
Content-Length:  0


    -- Executing [200@from-internal:1] Answer("PJSIP/100-0000000d", "") in new stack
       > 0x7fa5d40089b0 -- Strict RTP learning after remote address set to: 172.23.16.6:4004
<--- Transmitting SIP response (898 bytes) to UDP:192.168.1.5:17745 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.4.0.4:59393;rport=17745;received=192.168.1.5;branch=z9hG4bKPj47222f5cbbcf446f9fd2657dfb1a145c
Call-ID: 33553bc5117a4c81845b7c07613814d2
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>;tag=3b761fc3-3a64-4092-bbda-5f28ce19c03f
CSeq: 26944 INVITE
Server: Asterisk PBX 16.7.0
Contact: <sip:192.168.1.10:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800;refresher=uac
Require: timer
Content-Type: application/sdp
Content-Length:   235

v=0
o=- 3790999808 3790999810 IN IP4 192.168.1.10
s=Asterisk
c=IN IP4 192.168.1.10
t=0 0
m=audio 11478 RTP/AVP 0 104
a=rtpmap:0 PCMU/8000
a=rtpmap:104 telephone-event/8000
a=fmtp:104 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP request (362 bytes) from UDP:192.168.1.5:17745 --->
ACK sip:192.168.1.10:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPj2ea9149825b74775871b3aab0b37019f
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>;tag=3b761fc3-3a64-4092-bbda-5f28ce19c03f
Call-ID: 33553bc5117a4c81845b7c07613814d2
CSeq: 26944 ACK
Content-Length:  0


    -- Executing [200@from-internal:2] Verbose("PJSIP/100-0000000d", "CID 100") in new stack
CID 100
    -- Executing [200@from-internal:3] Wait("PJSIP/100-0000000d", "1") in new stack
       > 0x7fa5d40089b0 -- Strict RTP qualifying stream type: audio
       > 0x7fa5d40089b0 -- Strict RTP switching source address to 192.168.1.5:34574
    -- Executing [200@from-internal:4] Read("PJSIP/100-0000000d", "SPYNUM,extension,3,,,60") in new stack
    -- Accepting a maximum of 3 digits.
    -- <PJSIP/100-0000000d> Playing 'extension.ulaw' (language 'en')
<--- Received SIP request (392 bytes) from UDP:192.168.1.5:17745 --->
BYE sip:192.168.1.10:5060 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPje9cd10abd9fd403f8e9401001e8e1294
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>;tag=3b761fc3-3a64-4092-bbda-5f28ce19c03f
Call-ID: 33553bc5117a4c81845b7c07613814d2
CSeq: 26945 BYE
User-Agent: MicroSIP/3.19.26
Content-Length:  0


<--- Transmitting SIP response (381 bytes) to UDP:192.168.1.5:17745 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.4.0.4:59393;rport=17745;received=192.168.1.5;branch=z9hG4bKPje9cd10abd9fd403f8e9401001e8e1294
Call-ID: 33553bc5117a4c81845b7c07613814d2
From: <sip:100@192.168.1.10>;tag=e9f0e053c01440cbbf4957c57612ef70
To: <sip:200@192.168.1.10>;tag=3b761fc3-3a64-4092-bbda-5f28ce19c03f
CSeq: 26945 BYE
Server: Asterisk PBX 16.7.0
Content-Length:  0

But when I add /_100 in the dialplan:

[from-internal]
exten => 200/_100,1,Answer
 same => n,Verbose(CID ${CALLERID(num)})
 same => n,Wait(1)
 same => n,Read(SPYNUM,extension,3,,,60)
 same => n,ExecIf($[${SPYNUM}>99]?ChanSpy(PJSIP/${SPYNUM}))
 same => n,Verbose(MONITOR ${SPYNUM})
 same => n,Hangup

Then the output in the CLI looks like this (pjsip set logger on, core set verbose 9, core set debug 9):

<--- Received SIP request (1407 bytes) from UDP:192.168.1.5:17745 --->
INVITE sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPj9ffba957360b4d9984137f161ce46f8e
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=fac1246801c9484aa1d522ec0e05e1bb
To: <sip:200@192.168.1.10>
Contact: <sip:100@10.4.0.4:59393;ob>
Call-ID: 64f2c23550954aa98a75f6dd6a4edd10
CSeq: 28870 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.19.26
Content-Type: application/sdp
Content-Length:   792

v=0
o=- 3790999966 3790999966 IN IP4 172.23.16.6
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4006 RTP/AVP 96 97 98 99 3 0 8 9 100 102 103 101 104 105
c=IN IP4 172.23.16.6
b=TIAS:64000
a=rtcp:4007 IN IP4 172.23.16.6
a=sendrecv
a=rtpmap:96 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:98 speex/32000
a=rtpmap:99 iLBC/8000
a=fmtp:99 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:100 AMR/8000
a=fmtp:100 octet-align=1
a=rtpmap:102 SILK/16000
a=fmtp:102 useinbandfec=0
a=rtpmap:103 SILK/8000
a=fmtp:103 useinbandfec=0
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=rtpmap:104 telephone-event/8000
a=fmtp:104 0-16
a=rtpmap:105 telephone-event/32000
a=fmtp:105 0-16
a=ssrc:445269222 cname:4c20273939d23388

<--- Transmitting SIP response (545 bytes) to UDP:192.168.1.5:17745 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.4.0.4:59393;rport=17745;received=192.168.1.5;branch=z9hG4bKPj9ffba957360b4d9984137f161ce46f8e
Call-ID: 64f2c23550954aa98a75f6dd6a4edd10
From: <sip:100@192.168.1.10>;tag=fac1246801c9484aa1d522ec0e05e1bb
To: <sip:200@192.168.1.10>;tag=z9hG4bKPj9ffba957360b4d9984137f161ce46f8e
CSeq: 28870 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1582007511/a04168527f1bfc09eaf7525bc4936d42",opaque="5d9ad2a03ee96c0e",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP request (370 bytes) from UDP:192.168.1.5:17745 --->
ACK sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPj9ffba957360b4d9984137f161ce46f8e
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=fac1246801c9484aa1d522ec0e05e1bb
To: <sip:200@192.168.1.10>;tag=z9hG4bKPj9ffba957360b4d9984137f161ce46f8e
Call-ID: 64f2c23550954aa98a75f6dd6a4edd10
CSeq: 28870 ACK
Content-Length:  0


<--- Received SIP request (1700 bytes) from UDP:192.168.1.5:17745 --->
INVITE sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPjbd174e0cb4f4430bb7dd8c7847d52600
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=fac1246801c9484aa1d522ec0e05e1bb
To: <sip:200@192.168.1.10>
Contact: <sip:100@10.4.0.4:59393;ob>
Call-ID: 64f2c23550954aa98a75f6dd6a4edd10
CSeq: 28871 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.19.26
Authorization: Digest username="100", realm="asterisk", nonce="1582007511/a04168527f1bfc09eaf7525bc4936d42", uri="sip:200@192.168.1.10", response="5d4110068a31b90db14e6942a4346fa6", algorithm=md5, cnonce="e8c7cde391d74146b28a892e805551d0", opaque="5d9ad2a03ee96c0e", qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length:   792

v=0
o=- 3790999966 3790999966 IN IP4 172.23.16.6
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4006 RTP/AVP 96 97 98 99 3 0 8 9 100 102 103 101 104 105
c=IN IP4 172.23.16.6
b=TIAS:64000
a=rtcp:4007 IN IP4 172.23.16.6
a=sendrecv
a=rtpmap:96 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:98 speex/32000
a=rtpmap:99 iLBC/8000
a=fmtp:99 mode=30
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:100 AMR/8000
a=fmtp:100 octet-align=1
a=rtpmap:102 SILK/16000
a=fmtp:102 useinbandfec=0
a=rtpmap:103 SILK/8000
a=fmtp:103 useinbandfec=0
a=rtpmap:101 telephone-event/16000
a=fmtp:101 0-16
a=rtpmap:104 telephone-event/8000
a=fmtp:104 0-16
a=rtpmap:105 telephone-event/32000
a=fmtp:105 0-16
a=ssrc:445269222 cname:4c20273939d23388

<--- Transmitting SIP response (391 bytes) to UDP:192.168.1.5:17745 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.4.0.4:59393;rport=17745;received=192.168.1.5;branch=z9hG4bKPjbd174e0cb4f4430bb7dd8c7847d52600
Call-ID: 64f2c23550954aa98a75f6dd6a4edd10
From: <sip:100@192.168.1.10>;tag=fac1246801c9484aa1d522ec0e05e1bb
To: <sip:200@192.168.1.10>;tag=6307128f-7858-408d-af9a-a3dedeed6c82
CSeq: 28871 INVITE
Server: Asterisk PBX 16.7.0
Content-Length:  0


<--- Received SIP request (365 bytes) from UDP:192.168.1.5:17745 --->
ACK sip:200@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 10.4.0.4:59393;rport;branch=z9hG4bKPjbd174e0cb4f4430bb7dd8c7847d52600
Max-Forwards: 70
From: <sip:100@192.168.1.10>;tag=fac1246801c9484aa1d522ec0e05e1bb
To: <sip:200@192.168.1.10>;tag=6307128f-7858-408d-af9a-a3dedeed6c82
Call-ID: 64f2c23550954aa98a75f6dd6a4edd10
CSeq: 28871 ACK
Content-Length:  0

Caller ID number is 110 on the dial plan and the one on the From header is 100

I fixed this in my prevoius post - earlier I tested 110 extension.
This dialplan comes from my another Asterisk 13 installation where it works flawlessy.

I think I found the problem. In general 200 extension must be defined in pjsip.conf, what I think it is a bug as when we make a call without matching Caller ID it is not required (case 2).

case 1 - works

exten => 200,1,Answer
ext 200 is defined in pjsip.conf

case 2 - works

exten => 200,1,Answer
ext 200 is not defined in pjsip.conf

case 3 - works

exten => 200/_100,1,Answer
ext 200 is defined in pjsip.conf

case 4 - does not work

exten => 200/_100,1,Answer
ext 200 is not defined in pjsip.conf

Look like a Bug.

Regards

Indeed, I did a workaround for this problem in this way:

exten => 200,1,Answer
same => n,While($[${CALLERID(num)}=100])
...
same => n,EndWhile
same => n,Hangup

Better using GotoIf in the first line and then answer the call
only id the CID is 100. Otherwise, Hangup

Regards

Sounds like a misconfiguration or a bug to me.

I match on caller ID coming from my upstream carrier all the time, with and without wildcards.

Well try with the local call to an extension not defined in pjsip.conf or in odbc source.

Try in the following way:

[from-internal]
exten => _200/_100,1,Answer()

I think both must be defined as patterns.

Nope, this doesn’t work either.

[Feb 19 09:21:13] NOTICE[15464]: res_pjsip_session.c:3078 new_invite: Call from '100' (UDP:192.168.1.10:7012) to extension '200' rejected because extension not found in context 'from-internal'.

[from-internal]
exten => _200/_100,1,Answer

I can confirm this odd behavior with the PJSIP stack. When I enable debugging I get something like this:

[Feb 19 12:35:26] DEBUG[30308]: res_pjsip/pjsip_distributor.c:394 find_dialog: Could not find matching transaction for Request msg INVITE/cseq=1 (rdata0x7ec8000968)
[Feb 19 12:35:26] DEBUG[30308]: res_pjsip/pjsip_distributor.c:472 ast_sip_get_distributor_serializer: Calculated serializer pjsip/distributor-000000dc to use for Request msg INVITE/cseq=1 (rdata0x7ec8000968)
[Feb 19 12:35:26] DEBUG[30617]: res_pjsip_endpoint_identifier_ip.c:260 ip_identify_match_check: Source address 192.168.99.112:5060 does not match identify 'blabla_identify'
...
[Feb 19 12:35:26] DEBUG[30617]: res_pjsip_endpoint_identifier_user.c:148 username_identify: Attempting identify by From username 'tel50-xxx' domain 'rockpi4b.localdomain'
[Feb 19 12:35:26] DEBUG[30617]: res_pjsip_endpoint_identifier_user.c:160 username_identify: Identified by From username 'tel50-xxx' domain 'rockpi4b.localdomain'
[Feb 19 12:35:26] DEBUG[30617]: res_pjsip_authenticator_digest.c:454 digest_check_auth: Using default realm 'asterisk' on incoming auth 'tel50-xxx'.
[Feb 19 12:35:26] DEBUG[30308]: res_pjsip/pjsip_distributor.c:394 find_dialog: Could not find matching transaction for Request msg ACK/cseq=1 (rdata0x7ec8000968)
...
[Feb 19 12:35:26] NOTICE[30617]: res_pjsip_session.c:3129 new_invite: Call from 'tel50-xxxx' (UDP:192.168.99.112:5060) to extension '3053' rejected because extension not found in context 'from-internal'.
...

It looks as if there is some interaction with the code that tries to identify the phone. In my case the extension is 3053 instead of 200 and tel50-xxxx is the name of the sip account. I have not looked at the source code, so I don’t know whether the initial messages are really part of the problem.

Good that this is not only in my installation.
What is the procedure for reporting a bug to developers?

Issues are reported at https://issues.asterisk.org/jira and will need complete configuration that reproduces the problem with full details.