[OpenSIPS-Users] Problem proxying a SIP connection with t_relay and rtpproxy

Thomas Pircher thp.opensips at p5r.uk
Fri Sep 30 08:07:04 UTC 2022


Thomas Pircher wrote:
>The problem I am seeing is when I initiate a connection from the sipp
>client then I see RTP flowing only in one direction (sipp client to sipp
>server). I believe this is due to a missing ACK from OpenSIPS to the
>sipp server following the 200 OK.

Hi,

I no longer think the rtpproxy is part of the problem. I believe this is
purely an issue with my t_relay configuration.

I did some more tests, and I think the issue is that the ACK from the
sipp client at 10.30.8.203 is discarded by OpenSIPS, and therefore the
OpenSIPS does not send the ACK to the sipp server on the internal
interface.

This would also explain the "404 Not here" response to the BYE at the
end of the connection:

>  ┌───────────┐                    ┌─────────────────┐          ┌─────────────────┐                    ┌───────────┐
>  │sipp client│                    │OpenSIPS external│          │OpenSIPS internal│                    │sipp server│
>  │10.30.8.203│                    │10.30.8.201      │          │10.30.9.10       │                    │10.30.90.11│
>  └─────┬─────┘                    └────────┬────────┘          └────────┬────────┘                    └─────┬─────┘
>        │        INVITE SDP (g711A)         │                            │                                   │
>        │──────────────────────────────────>│                            │                                   │
>        │                                   │                            │                                   │
>        │       100 Giving it a try         │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>        │                                   │                            │                                   │
>        │                                   │                            │        INVITE SDP (g711A)         │
>        │                                   │                            │──────────────────────────────────>│
>        │                                   │                            │                                   │
>        │                                   │                            │           180 Ringing             │
>        │                                   │                            │<──────────────────────────────────│
>        │                                   │                            │                                   │
>        │           180 Ringing             │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>        │                                   │                            │                                   │
>        │                                   │                            │200 OK SDP (g711A telephone-event) │
>        │                                   │                            │<──────────────────────────────────│
>        │                                   │                            │                                   │
>        │200 OK SDP (g711A telephone-event) │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>        │                                   │                            │                                   │
>        │               ACK                 │                            │                                   │
>        │──────────────────────────────────>│                            │                                   │
>        │                                   │                            │                                   │
>        │                                   │                            │200 OK SDP (g711A telephone-event) │
>        │                                   │                            │<──────────────────────────────────│
>        │                                   │                            │                                   │
>        │200 OK SDP (g711A telephone-event) │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>        │                                   │                            │                                   │
>        │               ACK                 │                            │                                   │
>        │──────────────────────────────────>│                            │                                   │
>        │                                   │                            │                                   │
>        │                                   │                            │200 OK SDP (g711A telephone-event) │
>        │                                   │                            │<──────────────────────────────────│
>        │                                   │                            │                                   │
>        │200 OK SDP (g711A telephone-event) │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>        │                                   │                            │                                   │
>        │               ACK                 │                            │                                   │
>        │──────────────────────────────────>│                            │                                   │
>        │                                   │                            │                                   │
>        │                                   │                            │200 OK SDP (g711A telephone-event) │
>        │                                   │                            │<──────────────────────────────────│
>        │                                   │                            │                                   │
>        │200 OK SDP (g711A telephone-event) │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>        │                                   │                            │                                   │
>        │               ACK                 │                            │                                   │
>        │──────────────────────────────────>│                            │                                   │
>        │                                   │                            │                                   │
>        │                                   │                            │200 OK SDP (g711A telephone-event) │
>        │                                   │                            │<──────────────────────────────────│
>        │                                   │                            │                                   │
>        │               BYE                 │                            │                                   │
>        │──────────────────────────────────>│                            │                                   │
>        │                                   │                            │                                   │
>        │           404 Not here            │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>        │                                   │                            │                                   │
>        │               BYE                 │                            │                                   │
>        │──────────────────────────────────>│                            │                                   │
>        │                                   │                            │                                   │
>        │           404 Not here            │                            │                                   │
>        │<──────────────────────────────────│                            │                                   │
>  ┌─────┴─────┐                    ┌────────┴────────┐          ┌────────┴────────┐                    ┌─────┴─────┐
>  │sipp client│                    │OpenSIPS external│          │OpenSIPS internal│                    │sipp server│
>  │10.30.8.203│                    │10.30.8.201      │          │10.30.9.10       │                    │10.30.90.11│
>  └───────────┘                    └─────────────────┘          └─────────────────┘                    └───────────┘


In my understanding the ACK from the sipp client should be handled by
the t_relay() code in the global route:

> route {
>     if (!mf_process_maxfd_header(10) {
>         send_reply(483, "Too many hops");
>         exit;
>     }
> 
>     if (has_totag()) {
>         if (is_method("ACK") && t_check_trans()) {
>         t_relay();
>         exit;
>     }
> ...

However, the t_check_trans() function seems to return False for the ACK
from the sipp client. Is my understanding wrong? Or is there a mistake
in my usage in t_relay(, "udp:10.30.90.11:5060")?

Any help is greatly appreciated.

Thanks,
Thomas



More information about the Users mailing list