topology_hiding : ACK has extra via header.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

topology_hiding : ACK has extra via header.

Johan De Clercq

Hi,

Using opensips 2.4.4,

 

Scenario  Phone -> Opensips with topology-hiding -> Provider

 

When the INVITE comes in from the phone, the ip addr of the phone is in the via header.

When opensips forwards the request to the provider, the ip addr of opensips is in the via header. 

 

When 200 OK comes in from the provider and forwarded / relayed to the phone the via header is correct.

 

When ACK comes in from the phone, opensips adds an extra via header so the provider sees the ip address of the originating phone.

 

Samy Go opened an issue on this a few years ago, but I couldn’t find a solution.

 

 

 

cid:F3100D46-F00D-4610-87ED-3E91DA790A82

Johan De Clercq, Managing Director
Democon bvba - Ooigemstraat 41 - 8780 Oostrozebeke

Tel +3256980990 – GSM +32478720104

 


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: topology_hiding : ACK has extra via header.

vasilevalex
Hi Johan,

We are using topology_hiding in tm mode.
I've checked your case, ACK has only one VIA header.

What about BYE from the phone (if phone ends call)? Does it has extra VIA?
Do you use dialog or tm mode for topology hiding?



-----
---
Alexey Vasilyev
--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
---
Alexey Vasilyev
Reply | Threaded
Open this post in threaded view
|

Re: topology_hiding : ACK has extra via header.

Johan De Clercq
I use with dialog (need profiles in my setup).  The incoming ACK from the phone has only one via header whereas opensips goes to the carrier with two.  

BR,

-----Original Message-----
From: Users <[hidden email]> On Behalf Of vasilevalex
Sent: Wednesday, January 30, 2019 8:13 AM
To: [hidden email]
Subject: Re: [OpenSIPS-Users] topology_hiding : ACK has extra via header.

Hi Johan,

We are using topology_hiding in tm mode.
I've checked your case, ACK has only one VIA header.

What about BYE from the phone (if phone ends call)? Does it has extra VIA?
Do you use dialog or tm mode for topology hiding?



-----
---
Alexey Vasilyev
--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: topology_hiding : ACK has extra via header.

Johan De Clercq
In reply to this post by vasilevalex
Hi,

I found it :

1. This code results in having only one VIA header:
    ##initial INVITE
    if (is_method("INVITE") && !has_totag())
    {
        xlog("callid=$ci: Route[0]: initial INVITE is coming in from A: $fU to B: $rU");
        xlog("callid=$ci: Route[0]: let's do accounting first");
        do_accounting("db","cdr");
        topology_hiding();

2. The code resulting in 2 VIA headers:
    ##initial INVITE
    if (is_method("INVITE") && !has_totag())
    {
        xlog("callid=$ci: Route[0]: initial INVITE is coming in from A: $fU to B: $rU");
        xlog("callid=$ci: Route[0]: let's do accounting first");
        topology_hiding();
        do_accounting("db","cdr");

Is this now a bug or can somebody please explain why the code in 2 results in 2 VIA headers ?

-----Original Message-----
From: Users <[hidden email]> On Behalf Of vasilevalex
Sent: Wednesday, January 30, 2019 8:13 AM
To: [hidden email]
Subject: Re: [OpenSIPS-Users] topology_hiding : ACK has extra via header.

Hi Johan,

We are using topology_hiding in tm mode.
I've checked your case, ACK has only one VIA header.

What about BYE from the phone (if phone ends call)? Does it has extra VIA?
Do you use dialog or tm mode for topology hiding?



-----
---
Alexey Vasilyev
--
Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: topology_hiding : ACK has extra via header.

Răzvan Crainea-2
Hi, Johan!

Are there two identical via headers, or only one?
What is the OpenSIPS version you are using?

Best regards,
Răzvan

On 1/30/19 9:27 PM, johan de clercq wrote:

> Hi,
>
> I found it :
>
> 1. This code results in having only one VIA header:
>      ##initial INVITE
>      if (is_method("INVITE") && !has_totag())
>      {
>          xlog("callid=$ci: Route[0]: initial INVITE is coming in from A: $fU to B: $rU");
>          xlog("callid=$ci: Route[0]: let's do accounting first");
>          do_accounting("db","cdr");
>          topology_hiding();
>
> 2. The code resulting in 2 VIA headers:
>      ##initial INVITE
>      if (is_method("INVITE") && !has_totag())
>      {
>          xlog("callid=$ci: Route[0]: initial INVITE is coming in from A: $fU to B: $rU");
>          xlog("callid=$ci: Route[0]: let's do accounting first");
>          topology_hiding();
>          do_accounting("db","cdr");
>
> Is this now a bug or can somebody please explain why the code in 2 results in 2 VIA headers ?
>
> -----Original Message-----
> From: Users <[hidden email]> On Behalf Of vasilevalex
> Sent: Wednesday, January 30, 2019 8:13 AM
> To: [hidden email]
> Subject: Re: [OpenSIPS-Users] topology_hiding : ACK has extra via header.
>
> Hi Johan,
>
> We are using topology_hiding in tm mode.
> I've checked your case, ACK has only one VIA header.
>
> What about BYE from the phone (if phone ends call)? Does it has extra VIA?
> Do you use dialog or tm mode for topology hiding?
>
>
>
> -----
> ---
> Alexey Vasilyev
> --
> Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com
Meet the OpenSIPS team at the next OpenSIPS Summit:
   https://www.opensips.org/events

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: topology_hiding : ACK has extra via header.

Johan De Clercq
2 different ones and I use 244

On Thu, 31 Jan 2019, 13:20 Răzvan Crainea, <[hidden email]> wrote:
Hi, Johan!

Are there two identical via headers, or only one?
What is the OpenSIPS version you are using?

Best regards,
Răzvan

On 1/30/19 9:27 PM, johan de clercq wrote:
> Hi,
>
> I found it :
>
> 1. This code results in having only one VIA header:
>      ##initial INVITE
>      if (is_method("INVITE") && !has_totag())
>      {
>          xlog("callid=$ci: Route[0]: initial INVITE is coming in from A: $fU to B: $rU");
>          xlog("callid=$ci: Route[0]: let's do accounting first");
>          do_accounting("db","cdr");
>          topology_hiding();
>
> 2. The code resulting in 2 VIA headers:
>      ##initial INVITE
>      if (is_method("INVITE") && !has_totag())
>      {
>          xlog("callid=$ci: Route[0]: initial INVITE is coming in from A: $fU to B: $rU");
>          xlog("callid=$ci: Route[0]: let's do accounting first");
>          topology_hiding();
>          do_accounting("db","cdr");
>
> Is this now a bug or can somebody please explain why the code in 2 results in 2 VIA headers ?
>
> -----Original Message-----
> From: Users <[hidden email]> On Behalf Of vasilevalex
> Sent: Wednesday, January 30, 2019 8:13 AM
> To: [hidden email]
> Subject: Re: [OpenSIPS-Users] topology_hiding : ACK has extra via header.
>
> Hi Johan,
>
> We are using topology_hiding in tm mode.
> I've checked your case, ACK has only one VIA header.
>
> What about BYE from the phone (if phone ends call)? Does it has extra VIA?
> Do you use dialog or tm mode for topology hiding?
>
>
>
> -----
> ---
> Alexey Vasilyev
> --
> Sent from: http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com
Meet the OpenSIPS team at the next OpenSIPS Summit:
   https://www.opensips.org/events

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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: topology_hiding : ACK has extra via header.

Răzvan Crainea-2
Can you upload somewhere a SIP trace, so we can understand the setup and
SIP flow.
Also, is the VIA appearing only in ACK, or in INVITE too?

Best regards,
Razvan

On 1/31/19 2:21 PM, Johan De Clercq wrote:

> 2 different ones and I use 244
>
> On Thu, 31 Jan 2019, 13:20 Răzvan Crainea, <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi, Johan!
>
>     Are there two identical via headers, or only one?
>     What is the OpenSIPS version you are using?
>
>     Best regards,
>     Răzvan
>
>     On 1/30/19 9:27 PM, johan de clercq wrote:
>      > Hi,
>      >
>      > I found it :
>      >
>      > 1. This code results in having only one VIA header:
>      >      ##initial INVITE
>      >      if (is_method("INVITE") && !has_totag())
>      >      {
>      >          xlog("callid=$ci: Route[0]: initial INVITE is coming in
>     from A: $fU to B: $rU");
>      >          xlog("callid=$ci: Route[0]: let's do accounting first");
>      >          do_accounting("db","cdr");
>      >          topology_hiding();
>      >
>      > 2. The code resulting in 2 VIA headers:
>      >      ##initial INVITE
>      >      if (is_method("INVITE") && !has_totag())
>      >      {
>      >          xlog("callid=$ci: Route[0]: initial INVITE is coming in
>     from A: $fU to B: $rU");
>      >          xlog("callid=$ci: Route[0]: let's do accounting first");
>      >          topology_hiding();
>      >          do_accounting("db","cdr");
>      >
>      > Is this now a bug or can somebody please explain why the code in
>     2 results in 2 VIA headers ?
>      >
>      > -----Original Message-----
>      > From: Users <[hidden email]
>     <mailto:[hidden email]>> On Behalf Of vasilevalex
>      > Sent: Wednesday, January 30, 2019 8:13 AM
>      > To: [hidden email] <mailto:[hidden email]>
>      > Subject: Re: [OpenSIPS-Users] topology_hiding : ACK has extra via
>     header.
>      >
>      > Hi Johan,
>      >
>      > We are using topology_hiding in tm mode.
>      > I've checked your case, ACK has only one VIA header.
>      >
>      > What about BYE from the phone (if phone ends call)? Does it has
>     extra VIA?
>      > Do you use dialog or tm mode for topology hiding?
>      >
>      >
>      >
>      > -----
>      > ---
>      > Alexey Vasilyev
>      > --
>      > Sent from:
>     http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
>      >
>      > _______________________________________________
>      > Users mailing list
>      > [hidden email] <mailto:[hidden email]>
>      > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>      >
>      >
>      > _______________________________________________
>      > Users mailing list
>      > [hidden email] <mailto:[hidden email]>
>      > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>      >
>
>     --
>     Răzvan Crainea
>     OpenSIPS Core Developer
>     http://www.opensips-solutions.com
>     Meet the OpenSIPS team at the next OpenSIPS Summit:
>     https://www.opensips.org/events
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com
Meet the OpenSIPS team at the next OpenSIPS Summit:
   https://www.opensips.org/events

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: topology_hiding : ACK has extra via header.

Johan De Clercq
I will send this evening a small trace. 

On Thu, 31 Jan 2019, 13:27 Răzvan Crainea, <[hidden email]> wrote:
Can you upload somewhere a SIP trace, so we can understand the setup and
SIP flow.
Also, is the VIA appearing only in ACK, or in INVITE too?

Best regards,
Razvan

On 1/31/19 2:21 PM, Johan De Clercq wrote:
> 2 different ones and I use 244
>
> On Thu, 31 Jan 2019, 13:20 Răzvan Crainea, <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi, Johan!
>
>     Are there two identical via headers, or only one?
>     What is the OpenSIPS version you are using?
>
>     Best regards,
>     Răzvan
>
>     On 1/30/19 9:27 PM, johan de clercq wrote:
>      > Hi,
>      >
>      > I found it :
>      >
>      > 1. This code results in having only one VIA header:
>      >      ##initial INVITE
>      >      if (is_method("INVITE") && !has_totag())
>      >      {
>      >          xlog("callid=$ci: Route[0]: initial INVITE is coming in
>     from A: $fU to B: $rU");
>      >          xlog("callid=$ci: Route[0]: let's do accounting first");
>      >          do_accounting("db","cdr");
>      >          topology_hiding();
>      >
>      > 2. The code resulting in 2 VIA headers:
>      >      ##initial INVITE
>      >      if (is_method("INVITE") && !has_totag())
>      >      {
>      >          xlog("callid=$ci: Route[0]: initial INVITE is coming in
>     from A: $fU to B: $rU");
>      >          xlog("callid=$ci: Route[0]: let's do accounting first");
>      >          topology_hiding();
>      >          do_accounting("db","cdr");
>      >
>      > Is this now a bug or can somebody please explain why the code in
>     2 results in 2 VIA headers ?
>      >
>      > -----Original Message-----
>      > From: Users <[hidden email]
>     <mailto:[hidden email]>> On Behalf Of vasilevalex
>      > Sent: Wednesday, January 30, 2019 8:13 AM
>      > To: [hidden email] <mailto:[hidden email]>
>      > Subject: Re: [OpenSIPS-Users] topology_hiding : ACK has extra via
>     header.
>      >
>      > Hi Johan,
>      >
>      > We are using topology_hiding in tm mode.
>      > I've checked your case, ACK has only one VIA header.
>      >
>      > What about BYE from the phone (if phone ends call)? Does it has
>     extra VIA?
>      > Do you use dialog or tm mode for topology hiding?
>      >
>      >
>      >
>      > -----
>      > ---
>      > Alexey Vasilyev
>      > --
>      > Sent from:
>     http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
>      >
>      > _______________________________________________
>      > Users mailing list
>      > [hidden email] <mailto:[hidden email]>
>      > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>      >
>      >
>      > _______________________________________________
>      > Users mailing list
>      > [hidden email] <mailto:[hidden email]>
>      > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>      >
>
>     --
>     Răzvan Crainea
>     OpenSIPS Core Developer
>     http://www.opensips-solutions.com
>     Meet the OpenSIPS team at the next OpenSIPS Summit:
>     https://www.opensips.org/events
>
>     _______________________________________________
>     Users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

--
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com
Meet the OpenSIPS team at the next OpenSIPS Summit:
   https://www.opensips.org/events

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

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