I don't understand, are you able to send an INVITE to Asterisk via TCP?
Could you share a trace of the calls, masking the sensible information?

Cheers,

Federico

On Fri, May 18, 2018 at 4:56 PM, Wilkins, Steve <swwilkins@mitre.org> wrote:

I have tried using t_relay_to_tcp() and t_realy, both with and without setting $ru = $ru + ";transport=tcp" right before the call.

I get different errors and failures depending on which way I make the call.  Which log would you want to see?

 

  • I also wanted to point out that if I use UDP, the call connects (it is a WebRTC client to WebRTC client call, and both clients are registered in Kamailio).  The call just gets dropped after 30 seconds because Asterisk 15.3 is not receiving the ACK back to the ‘200 OK’.  Aas stated, TCP does not even connect.

 

  • Another very interesting thing is that if I use UDP and Asterisk 14.6, the call works perfect! It stays connected and I have full duplex Audio and Video

 

Thank you!

 

 

From: sr-users [mailto:sr-users-bounces@lists.kamailio.org] On Behalf Of Federico Cabiddu
Sent: Friday, May 18, 2018 8:49 AM


To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Transport issue thought

 

Can you print the logs when it tries to send the ACK?

Check also that the ACK ruri contains the same destination port which was used for the INVITE, otherwise a new connection will be created.

 

Best regards,

 

Federico

 

On Fri, May 18, 2018 at 2:31 PM, Wilkins, Steve <swwilkins@mitre.org> wrote:

Thank you Alex and Federico,

 

I verified, and SO_REUSEPORT is defined on my OS.  I am using Kamailio 5.2 and I set ‘tcp_reuse_port=yes;’ and $fs;  this has been to no avail as ‘ACK’s’ are still using the high port number randomly assigned by Kamailio.

 

Thank you all for sharing your knowledge!

 

 

From: sr-users [mailto:sr-users-bounces@lists.kamailio.org] On Behalf Of Federico Cabiddu
Sent: Friday, May 18, 2018 12:57 AM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Transport issue thought

 

You are right Alex, Linux kernel didn't support SO_REUSEPORT, which allows a socket to be used as source for a tcp connection while is already bound, until version 3.9.

Kamailio's parameter tcp_reuse_port, if enabled and your OS has support for SO_REUSEPORT (so not only Linux but FreeBSD, OSX and others), allows you to use force_send_socket (or $fs) to send messages from a TCP port kamailio is listening to.

 

Cheers,

 

Federico

 

On Fri, May 18, 2018 at 12:28 AM, Alex Balashov <abalashov@evaristesys.com> wrote:

When an outgoing TCP connection is opened, either a port can be
explicitly bound, or it is auto-assigned by the OS's networking stack. I
believe Kamailio does the latter and does not offer options to constrain
the range. If it does, I'm not aware of any apart from this one:

https://www.kamailio.org/wiki/cookbooks/5.1.x/core#tcp_reuse_port

Not sure if it would help in this case, you'd have to give it a try.


On Thu, May 17, 2018 at 10:21:34PM +0000, Wilkins, Steve wrote:

> It appears that the bottom line of my TCP transport not working is that Kamailio is randomly assigning large port numbers to send the TCP traffic out on.
> I am not able to randomly open high ports for this purpose.  Is there a way to tell Kamailio to only use specific ports for this.  I have tried using
> force_send_socket() with Kamailio' s IP, and the port I want to send out on, but this did not work either.  Does this sound like I am on the right track?
>
> Thank you,
> -

> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

 


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

 


_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users