Thanks for your help Henning. The error was on Asterisk, now everything is working like a charm.

On Thu, Nov 1, 2018 at 11:29 AM Henning Westerholt <hw@kamailio.org> wrote:
Am Donnerstag, 1. November 2018, 11:18:37 CET schrieb Joan Salvatella:
> Thanks for your quick response. Kamailio is complaining about a too long
> SIP message so migrating to TCP makes sense (I hadn't thought about it).
>
> I have enabled TCP in kamailio.cfg:
> disable_tcp=no
>
> I am using the dispatchers module to identify the gateway endpoints and I
> have updated it accordingly:
>
> 1 sip:10.0.1.69:5080;transport=tcp
>
> and in my invite resolver I am forcing the sending socket to be tcp as
> well.
> [..]
>    $fs = "tcp:PRIVATE_IP:5080";
> [..]
> Are there any resources that I can check to make sure that I am not missing
> anything? Since this is not working, I am suspecting it is related with the
> Asterisk side of things but that should be handled in another mail list.
> > [..]

Hello Joan,

on a first sight it looks fine. Do you get an error from the asterisk side?
Then indeed it would be good to ask on the asterisk user list about that.

If you get also errors in the Kamailio log, we would need more details about
this to continue here.

Best regards,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
Kamailio security assessment - https://skalatan.de/de/assessment