[OpenSIPS-Users] DIfference between R-URI and Destination URI in openSIPs

Mohamed OUALLA oualla.simohamed at gmail.com
Wed Jul 31 11:46:54 UTC 2024


Hi Alex,

  Thank you for the detailed clarification.

  I appreciate the explanation that the *Destination URI* in OpenSIPS
configuration script represents *the next-hop destination at the network
and transport layer!* while the Request URI is a logical destination in the
SIP message.

  Additionally, I have observed similar behavior in SIP tools like SIPp and
sipsak, where subsequent requests in the case of *SIPp* are sent to the
first proxy instead of directly to the UAS, even if they use the R-URI of
the UAS or callee, while analysing the addresses in the transport layer
using wireshark I have seen that these tools use different address. I was
able to resolve this issue by using the *setdest *action in SIPp's xml
scenario, ensuring that the requests are routed correctly.

  Thank you again for clarifying that the Destination URI takes routing
priority over the Request URI, similar to how the Route header works
against the R-URI.


  I also apologize for the confusion regarding the AoR and R-URI; as you
mentioned, the AoR indicates "who I am", while the Contact address
indicates "where I am", used by location & Registrar services.


  One last question: What is the most effective way to connect the caller
and callee in a simple VoIP call setup (Caller - SIP Proxy - Callee)?
Should I change the *$ru* and then use *forward()* for stateless routing or
*t_relay()* for stateful routing, or is there another method you would
recommend?

Mohamed.


On Wed, Jul 31, 2024 at 4:00 AM Alex Balashov <abalashov at evaristesys.com>
wrote:

> Hi,
>
> The Request URI is a SIP concept, while the destination URI might be best
> described as a fictive invention of OpenSIPS configuration script. It
> represents the next-hop destination to which the request will be forwarded
> on the network and transport layer, as you correctly surmised, while the
> request URI is a logical destination. The destination URI supersedes the
> request URI, but if the destination URI is not set, the
> domain/port/transport attributes of the request URI are consumed to
> determine the forwarding destination.
>
> An RURI is not the same thing as an Address of Record; an AoR refers to a
> logical URI entity in the location service (registrar) context. The purpose
> of a registrar is to map an AoR (such as sip:mohamed at sip.opensips.org) to
> one or more Contact URIs (e.g. sip:line1 at 192.168.1.100;user=phone), which
> indicate how to reach a given device on the network and transport layer.
>
> Hopefully that helps!
>
> -- Alex
>
> > On Jul 30, 2024, at 9:26 PM, Mohamed OUALLA <oualla.simohamed at gmail.com>
> wrote:
> >
> > Hello all,
> >
> >   I have a technical question about the difference between Request URI
> and Destination URI in SIP. In my understanding of SIP, the R-URI (Request
> URI) is located in the start line of the SIP request and is also known as
> the Address of Record (AoR). However, I am unclear about what the
> Destination URI is for openSIPs. Is it the same as the Request URI, or is
> it related to an added route header, or the destination address in the
> transport protocol, I am not sure about it?
> >
> >   Additionally, I have observed that when I change the $du pseudo
> variable in OpenSIPS, it relays the request to the UAS without changing the
> R-URI (change it with the sip uri I gave to $du pseudo variable). This
> behavior is the same as using the t_relay() method, which also does not
> change the R-URI but sends the request to the UAS. I guess that changes
> have been done only for the destination address in the transport layer.
> >
> >   Could someone please explain these observations and clarify the
> difference between R-URI and Destination URI?
> >   And the best way to route calls from UAC to UAS in simple VoIP call
> components (Caller - SIP Proxy - Callee), actually I change the $ru, then I
> forward() the request stateless or t_relay() stateful.
> >
> > Thank you.
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> --
> Alex Balashov
> Principal Consultant
> Evariste Systems LLC
> Web: https://evaristesys.com
> Tel: +1-706-510-6800
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


-- 
==============================
Mohamed OUALLA
*VoIP Technical Solutions and Software Engineer*
Mail: oualla.simohamed at gmail.com
N.Phone: +212 6 29 19 3116
<oualla.simohamed at gmail.com>*SSC Certified Professional*
==============================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240731/3b730917/attachment-0001.html>


More information about the Users mailing list