drachtio / drachtio-server

A SIP call processing server that can be controlled via nodejs applications
https://drachtio.org
MIT License
237 stars 92 forks source link

Message being sent to URI instead of Route header #277

Open cchiaramelli opened 1 year ago

cchiaramelli commented 1 year ago

This is probably NOT an issue, but this is the best place I found for sharing

While sending a SIP MESSAGE though Drachtio, I would expect that the Route header would be used as destination for that message, not the URI.

Drachtio MESSAGE log:

scripts-drachtio-1       | MESSAGE sip:10.5.0.10:5090 SIP/2.0
scripts-drachtio-1       | Via: SIP/2.0/UDP 10.5.0.11;rport;branch=z9hG4bKKS372Zr5X3B6c
scripts-drachtio-1       | Route: <sip:scscf2.home1.net>
scripts-drachtio-1       | Max-Forwards: 70
scripts-drachtio-1       | From: <10.5.0.11>;tag=maXymBy3SD8yc
scripts-drachtio-1       | To: <sip:10.5.0.10:5090>
scripts-drachtio-1       | Call-ID: 98a9fa28-60a1-123c-8d9f-02420a05000b
scripts-drachtio-1       | CSeq: 66802100 MESSAGE
scripts-drachtio-1       | Request-Disposition: no-fork
scripts-drachtio-1       | Accept-Contact: *;+g.3gpp.smsip;require;explicit
scripts-drachtio-1       | Content-Type: application/vnd.3gpp.sms
scripts-drachtio-1       | Content-Length: 36
scripts-drachtio-1       | P-Asserted-Identity: <10.5.0.11>

I would expect it to resolve the destination to "sip:scscf2.home1.net" instead of 10.5.0.10, but the Wireshark shows it sent it directly to 10.5.0.10

image

Even though the Route header is still there

image

Is this the expected behaviour? Is there any missing configuration for that routing to work as I mentioned?

Thanks!

davehorton commented 1 year ago

Since there is no tag in the To header this is not an in-dialog request. Route headers on requests outside of a dialog are not really a thing

cchiaramelli commented 1 year ago

quests o

We're using drachtio for a Short Message Service Centre, so we need to send MESSAGES without establishing a dialog using INVITE. I'm now testing the proxy attribute for Srf, it seems like it can trigger the behaviour we're expecting