Johan,

This is actually a pretty standard SIP flow that we use all the time. I 
recommend this article [1] for an overview of how routing works in SIP.

In short, the Contact and Record-Route headers are only used for routing of 
requests not responses, and mostly only sequential requests which are requests 
within a dialog. The topology_hiding_match and loose_route functions both 
operate on requests only, so they can both only be called from a request_route 
[1] [2].

The 200 OK is a response within the initial INVITE transaction. Responses 
within a SIP transaction are routed based on the source IP of request and/or 
the Via headers. OpenSIPS should just handle that for you, unless you have some 
strange routing.

[1] 
https://kb.smartvox.co.uk/opensips/contact-and-record-route-headers-explained/
[2] 
https://opensips.org/docs/modules/3.2.x/topology_hiding.html#func_topology_hiding_match
[3] https://opensips.org/docs/modules/3.2.x/rr.html#func_loose_route

Ben Newlin

From: Users <[email protected]> on behalf of johan 
<[email protected]>
Date: Friday, October 6, 2023 at 10:30 AM
To: OpenSIPS users mailling list <[email protected]>
Subject: [OpenSIPS-Users] on routing invite's in a trunk context.
 EXTERNAL EMAIL - Please use caution with links and attachments

This is a general question on routing (to be honest: it is a really
strange case).


A has a sip trunk to B (opensips), B has a sip trunk to C



A sends an invite to B with contact header A'   and record-route header
to A''

B string the record_route header , calls topology hiding and droutes the
call to C

C sends 200 OK back but it needs to be routed on the content of the
contact header.


Now how does this route to A ?   Is this the default
topology_hiding_match() case ? Or do I need to do something special ?






_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to