Message received with no handler found

Hi Folks,

I am having an issue with no handler found. Asterisk version is 22.1.0 ( its was 18 but because of this i upgraded it)

[Nov 25 19:58:54] VERBOSE1759904 res_pjsip_logger.c: <--- Received SIP request (770 bytes) from UDP:192.168.0.81:61360 --->
MESSAGE sip:ta74@192.168.0.41 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.81:61360;branch=z9hG4bK1476551921;rport
Max-Forwards: 70
From: ta74 <sip:ta74@192.168.0.41>;tag=2032429778
To: ta74 <sip:ta74@192.168.0.41>
Call-ID: 177237456-1545205061-1639938161
CSeq: 2 MESSAGE
Content-Type: application/scaip+xml
Content-Length: 145
Authorization: Digest username="ta74",uri="sip:ta74@192.168.0.41",algorithm=MD5,realm="asterisk",nonce="1732564734/d99c207bed8a4fe5c10d106ce0bd8dfe",response="ae9109a9233522dd88b52e1519ccadeb",qop=auth,nc=00000001, cnonce="1136913492",opaque="1c82239977cd9877"
User-Agent: SIP UA TeleAlarm 1.7

<mrq><ref>oavLmJk8KyfQud0M</ref><cid>353998877664</cid><dty>0004</dty><mty>ME</mty><stc>0010</stc><lco>001</lco><crd>sip:</crd><cha>0</cha></mrq>
DEBUG[1759904] res_pjsip/pjsip_distributor.c: Could not find matching transaction for Request msg MESSAGE/cseq=2 (rdata0x7c8f14013208)
DEBUG[1759904] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-0000002b to use for Request msg MESSAGE/cseq=2 (rdata0x7c8f14013208)
DEBUG[1759905] netsock2.c: Splitting '192.168.0.81' into...
DEBUG[1759905] netsock2.c: ...host '192.168.0.81' and port ''.
DEBUG[1759905] res_pjsip_endpoint_identifier_ip.c: Source address 192.168.0.81:61360 matches identify 'ta74-identify'
DEBUG[1759905] res_pjsip_endpoint_identifier_ip.c: Identify 'ta74-identify' SIP message matched to endpoint ta74-endpoint
DEBUG[1759905] res_pjsip_authenticator_digest.c: Using default realm 'asterisk' on incoming auth 'ta74-auth'.
DEBUG[1759905] res_pjsip_authenticator_digest.c: Calculated nonce 1732564734/d99c207bed8a4fe5c10d106ce0bd8dfe. Actual nonce is 1732564734/d99c207bed8a4fe5c10d106ce0bd8dfe
[Nov 25 19:58:54] DEBUG[1759905] res_pjsip_authenticator_digest.c: Realm: asterisk  Username: ta74  Result: SUCCESS
[Nov 25 19:58:54] DEBUG[1759905] netsock2.c: Splitting '10.2.18.229' into...
[Nov 25 19:58:54] DEBUG[1759905] netsock2.c: ...host '10.2.18.229' and port ''.
[Nov 25 19:58:54] DEBUG[1759905] netsock2.c: Splitting '192.168.0.81' into...
[Nov 25 19:58:54] DEBUG[1759905] netsock2.c: ...host '192.168.0.81' and port ''.
[Nov 25 19:58:54] SECURITY[1759942] res_security_log.c: SecurityEvent="SuccessfulAuth",EventTV="2024-11-25T19:58:54.980+0000",Severity="Informational",Service="PJSIP",EventVersion="1",AccountID="ta74-endpoint",SessionID="177237456-1545205061-1639938161",LocalAddress="IPV4/UDP/10.2.18.229/5060",RemoteAddress="IPV4/UDP/192.168.0.81/61360",UsingPassword="1"
[Nov 25 19:58:54] DEBUG[1759905] res_pjsip_session.c:  (null session) Request: MESSAGE 
[Nov 25 19:58:54] DEBUG[1759905] res_pjsip_session.c:  (null session) Handled request MESSAGE  ? no
[Nov 25 19:58:54] DEBUG[1759905] message.c: Seeing if dialplan can handle message
[Nov 25 19:58:54] DEBUG[1759905] message.c: Seeing if ari can handle message
[Nov 25 19:58:54] DEBUG[1759905] stasis/messaging.c: No subscription found for PJSIP/ta74-endpoint
[Nov 25 19:58:54] DEBUG[1759905] res_pjsip_messaging.c: MESSAGE request received, but no handler wanted it
[Nov 25 19:58:54] VERBOSE[1759905] res_pjsip_logger.c: <--- Transmitting SIP response (340 bytes) to UDP:192.168.0.81:61360 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.0.81:61360;rport=61360;received=192.168.0.81;branch=z9hG4bK1476551921
Call-ID: 177237456-1545205061-1639938161
From: "ta74" <sip:ta74@192.168.0.41>;tag=2032429778
To: "ta74" <sip:ta74@192.168.0.41>;tag=z9hG4bK1476551921
CSeq: 2 MESSAGE
Server: Asterisk PBX 22.1.0
Content-Length:  0

PJSIP CONF

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060

[ta74-endpoint]
type=endpoint
transport=transport-udp
context=scontext
message_context=scontext
disallow=all
allow=ulaw
auth=ta74-auth
aors=ta74-aor

[ta74-auth]
type=auth
auth_type=userpass
username=ta74
password=ta74password

[ta74-aor]
type=aor
contact=sip:ta74@192.168.0.81

[ta74-identify]
type=identify
endpoint=ta74-endpoint
match=192.168.0.81

Extensions CONF

[scontext]
exten => _X.,1,NoOp(Incoming MESSAGE hit scaip_debug context)
same => n,Verbose(1, SIP MESSAGE: ${MESSAGE(body)})
same => n,Hangup()

If anyone has any assistance that would be great .

Thanks

“application/scaip+xml” is not a supported content type. Code and support would have to be written for such a thing. According to the output, that has not been done so the MESSAGE request wasn’t handled.

And based on the other post I just noticed/remembered, you’ve altered the code.

The MESSAGE request is trying to go into the dialplan at extension “ta74”. You do not have dialplan for that. Your dialplan is expecting a number at the front.

Hi There,

Thank you for the quick reply.

I had a 415 error on the content-type and i modified the res_pjsip_messaging.c file and made a new standard object which resolved that piece.

static enum pjsip_status_code check_content_type(const pjsip_rx_data *rdata)
{
        int res;  
        if (rdata->msg_info.msg->body && rdata->msg_info.msg->body->len) {
                res = ast_sip_is_content_type(
                        &rdata->msg_info.msg->body->content_type, "text", "plain") ||
                      ast_sip_is_content_type(
                        &rdata->msg_info.msg->body->content_type, "application", "scaip+xml");
        } else {
                res = rdata->msg_info.ctype &&
                        (ast_sip_is_content_type(
                                &rdata->msg_info.ctype->media, "text", "plain") ||
                        ast_sip_is_content_type(
                                &rdata->msg_info.ctype->media, "application", "scaip+xml"));
        }

        return res ? PJSIP_SC_OK : PJSIP_SC_UNSUPPORTED_MEDIA_TYPE;
}

Are you saying then further is required ? I was thinking the payload body from the sip message would be parsed using a handler next.

your reply was too quick sorry i didnt see it before you posted !

exten => .,1,NoOp

I take it you mean something alone these lines ? this would make sense i will test later .

Thanks