Re: [SR-Users] Double port in TO header

2020-10-30 Thread Alex Balashov

On 10/30/20 7:31 AM, David Villasmil wrote:

Thanks, sometimes when i'm stuck just write it out as a sounding board, 
i guess.


I do the same. That's what we're here for. :-)

--
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


Re: [SR-Users] Double port in TO header

2020-10-30 Thread Noah Mehl
Daniel,

Thank you for the writeup.  I tried the following:

tcp_reuse_port=yes

It did not seem to make any difference, in terms of using port 5060.  I built 
and am running on kernel: 4.19.0-12.  Do I need to do something special when I 
build kamailio for this feature?

It’s definitely my preference that Kamailio send requests from tcp port 5060 if 
that’s a listen port (I am also looking into the issue with Freeswitch 
separately).

I’m not entirely sure how Kamailio is supposed to *pick* 5060, as I have 3 tcp 
ports in my config (TCP on 5060, TLS on 5061, and TLS on 443).

Thanks!

~Noah

> On Oct 29, 2020, at 6:22 PM, Alex Balashov  wrote:
> 
> Hello,
> 
> confirming what Henning said that dispatcher is not using uac module,
> not to be any doubt about that. Actually, uac modules uses some of the
> TM-UAC functions as dispatcher module, but between dispatcher and uac
> module is no relation, no dependency. Sockets can be enforced in
> dispatcher via socket attribute (I think is also a modparam for a global
> need), however see next remarks about what can happen.
> 
> Besides that, I am writing to add on the original topic related to tcp
> local ports. Tipically they have nothing to do with the listen port
> (5060), the force socket for TCP is mainly a best-effort to use at least
> the same network interface, but the OS/kernel may use a different one,
> based on IP routing rules and priorities. The local ports are selected
> from ephemeral ports range, searching the web should reveal more details
> about, for example:
> 
>   *
> https://superuser.com/questions/1118735/how-are-source-ports-determined-and-how-can-i-force-it-to-use-a-specific-port
> 
> On newer kernels there is an option to try to reuse ports even for tcp
> (which was possible for UDP before, but not for TCP), kamailio has a
> core parameter to enable it. See if enabling that gives what is wanted.
> But if one thinks of firewall rules, for tcp it should allow based on IP
> and eventually the ephemeral ports range of the source (which is hard to
> figure out if it is not another fully managed system).
> 
> Olle added relevant details, adding a bit more: the port in Via header
> is for "connect back here if the connection of the request is no longer
> available", otherwise the connection is reused and Via address is more
> for aesthetic purposes (e.g., think also about a device behind nat that
> has via with private ip address, in such case is not possible to connect
> back at all).
> 
> Cheers,
> Daniel
> 
> On 30.10.20 09:05, Henning Westerholt wrote:
>> Hi Alex,
>> 
>> this is not correct. The dispatcher module uses the uac function from TM 
>> module for the generation and sending out of OPTIONS requests.
>> 
>> So setting the mentioned function from the uac module will probably not help.
>> 
>> Cheers,
>> 
>> Henning
>> 
>> -- 
>> Henning Westerholt – https://skalatan.de/blog/
>> Kamailio services – https://gilawa.com 
>> 
>> -Original Message-
>> From: sr-users  On Behalf Of Alex 
>> Balashov
>> Sent: Thursday, October 29, 2020 9:11 PM
>> To: sr-users@lists.kamailio.org
>> Subject: Re: [SR-Users] Confusion about TCP worker ports
>> 
>> On 10/29/20 3:57 PM, Noah Mehl wrote:
>> 
>>> Is there no way to send the requests from the listen port?
>> The OPTIONS pinging dispatcher does internally is opaque, so I'm not sure.
>> 
>> However, the source shows that dispatcher uses the UAC module for its 
>> internally generated OPTIONS pings, which is sensible:
>> 
>> https://github.com/kamailio/kamailio/blob/master/src/modules/dispatcher/dispatch.c#L3445
>> 
>> If so, it stands to reason that loading 'uac' and setting this modparam may 
>> have some effect:
>> 
>> https://kamailio.org/docs/modules/5.4.x/modules/uac.html#uac.p.default_socket
>> 
>> I am not sure if it applies only to requests synthesised within the config 
>> script and sent using uac_req_send(), or to any requests constructed by the 
>> UAC module, though.
>> 
>>> And if they’re not going to come from the listen port, can you please 
>>> help me with the a way to update the message for the worker chosen 
>>> rport?
>> Try the above and see if it does anything.
>> 
>> -- Alex
>> 
>> --
>> 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
> 
> -- 
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Funding: https://www.paypal.me/dcmierla
> 
> 
> ___
> Kamailio (SER) - Users Mailing List
> 

Re: [SR-Users] Double port in TO header

2020-10-30 Thread David Villasmil
I had this somewhere before the RELAY

$var(destdom) = $du;
$td = $(var(destdom){s.replace,sip:,});

No idea why, this is a very old deployment. I think i wanted to set the
domain instead of using "ds_set_domain" for some reason i can't quite
remember now. I usually comment my code, but this one i didn't.

Thanks, sometimes when i'm stuck just write it out as a sounding board, i
guess.

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Thu, Oct 29, 2020 at 11:47 PM Alex Balashov 
wrote:

> :-)  What was it?
>
> On 10/29/20 6:54 PM, David Villasmil wrote:
> > Like i said: It was me.
> >
> > sorry for the noise
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.w...@gmail.com
> > 
> > phone: +34669448337
> >
> >
> > On Thu, Oct 29, 2020 at 10:35 PM David Villasmil
> > mailto:david.villasmil.w...@gmail.com>>
>
> > wrote:
> >
> > I don't know what to think... knowing kamailio it's probably me
> > somehow...
> >
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.w...@gmail.com
> > 
> > phone: +34669448337
> >
> >
> > On Thu, Oct 29, 2020 at 10:22 PM Alex Balashov
> > mailto:abalas...@evaristesys.com>>
> wrote:
> >
> > So it is your belief that Kamailio is modifying the To header
> > via an
> > unknown mechanism?
> >
> > On 10/29/20 6:19 PM, David Villasmil wrote:
> >  > No, no to manipulation...
> >  >
> >  > Regards,
> >  >
> >  > David Villasmil
> >  > email: david.villasmil.w...@gmail.com
> > 
> >  >  > >
> >  > phone: +34669448337
> >  >
> >  >
> >  > On Thu, Oct 29, 2020 at 9:45 PM Alex Balashov
> > mailto:abalas...@evaristesys.com>
> >  >  > >> wrote:
> >  >
> >  > Kamailio shouldn't be touching the To header at all,
> > unless you're
> >  > modifying it using uac_replace_to()?
> >  >
> >  > -- Alex
> >  >
> >  > On 10/29/20 5:35 PM, David Villasmil wrote:
> >  >  > Hello guys,
> >  >  >
> >  >  > This happened to me a long time ago but i totally
> > forgot the reason.
> >  >  >
> >  >  > I using a simple dispatcher, and when relaying out to
> the
> >  > destination,
> >  >  > kamailio is adding an additional :5060 port to the To
> > header:
> >  >  >
> >  >  > To:  > 
> >  > :5060>
> >  >  >
> >  >  > The Destination is actually 172.16.6.1:5080
> > 
> >  >  , i
> >  >  > don't know why Kamailio is adding that :5060
> >  >  >
> >  >  > The dispatcher is
> >  >  >
> >  >  >if (!ds_select_dst($var(dispatcher_outbound), "4"))
> {
> >  >  >  xlog("[DISPATCH]: ds_select_dst FAILED!\n");
> >  >  >  send_reply("404", "No destination");
> >  >  >  exit;
> >  >  >  } else {
> >  >  >  xlog("[DISPATCH]: ds_select_dst was
> > succesful\n");
> >  >  >  }
> >  >  >  xlog("L_DBG", "[DISPATCH]: going to <$ru> via
> > <$du>\n");
> >  >  >  t_on_failure("RTF_DISPATCH");
> >  >  >  route(RELAY);
> >  >  >
> >  >  > Any ideas? I totally forgot... and it's late, i
> guess...
> >  >  >
> >  >  > Thanks!
> >  >  >
> >  >  > David Villasmil
> >  >  > email: david.villasmil.w...@gmail.com
> > 
> >  >  > >
> >  >  >  > 
> >  >  > >>
> >  >  > phone: +34669448337
> >  >  >
> >  >  > ___
> >  >  > Kamailio (SER) - Users Mailing List
> >  >  > sr-users@lists.kamailio.org
> > 
> >  > >
> >  >  >
> > 

Re: [SR-Users] Double port in TO header

2020-10-29 Thread Alex Balashov

:-)  What was it?

On 10/29/20 6:54 PM, David Villasmil wrote:

Like i said: It was me.

sorry for the noise
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com 


phone: +34669448337


On Thu, Oct 29, 2020 at 10:35 PM David Villasmil 
mailto:david.villasmil.w...@gmail.com>> 
wrote:


I don't know what to think... knowing kamailio it's probably me
somehow...

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com

phone: +34669448337


On Thu, Oct 29, 2020 at 10:22 PM Alex Balashov
mailto:abalas...@evaristesys.com>> wrote:

So it is your belief that Kamailio is modifying the To header
via an
unknown mechanism?

On 10/29/20 6:19 PM, David Villasmil wrote:
 > No, no to manipulation...
 >
 > Regards,
 >
 > David Villasmil
 > email: david.villasmil.w...@gmail.com

 > >
 > phone: +34669448337
 >
 >
 > On Thu, Oct 29, 2020 at 9:45 PM Alex Balashov
mailto:abalas...@evaristesys.com>
 > >> wrote:
 >
 >     Kamailio shouldn't be touching the To header at all,
unless you're
 >     modifying it using uac_replace_to()?
 >
 >     -- Alex
 >
 >     On 10/29/20 5:35 PM, David Villasmil wrote:
 >      > Hello guys,
 >      >
 >      > This happened to me a long time ago but i totally
forgot the reason.
 >      >
 >      > I using a simple dispatcher, and when relaying out to the
 >     destination,
 >      > kamailio is adding an additional :5060 port to the To
header:
 >      >
 >      > To: http://sip:910609738@172.31.6.1:5080>
 >     :5060>
 >      >
 >      > The Destination is actually 172.16.6.1:5080

 >      , i
 >      > don't know why Kamailio is adding that :5060
 >      >
 >      > The dispatcher is
 >      >
 >      >    if (!ds_select_dst($var(dispatcher_outbound), "4")) {
 >      >          xlog("[DISPATCH]: ds_select_dst FAILED!\n");
 >      >          send_reply("404", "No destination");
 >      >          exit;
 >      >      } else {
 >      >          xlog("[DISPATCH]: ds_select_dst was
succesful\n");
 >      >      }
 >      >      xlog("L_DBG", "[DISPATCH]: going to <$ru> via
<$du>\n");
 >      >      t_on_failure("RTF_DISPATCH");
 >      >      route(RELAY);
 >      >
 >      > Any ideas? I totally forgot... and it's late, i guess...
 >      >
 >      > Thanks!
 >      >
 >      > David Villasmil
 >      > email: david.villasmil.w...@gmail.com

 >     >
 >      > 
 >     >>
 >      > phone: +34669448337
 >      >
 >      > ___
 >      > 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
 >

-- 

Re: [SR-Users] Double port in TO header

2020-10-29 Thread David Villasmil
Like i said: It was me.

sorry for the noise
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Thu, Oct 29, 2020 at 10:35 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> I don't know what to think... knowing kamailio it's probably me somehow...
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
>
> On Thu, Oct 29, 2020 at 10:22 PM Alex Balashov 
> wrote:
>
>> So it is your belief that Kamailio is modifying the To header via an
>> unknown mechanism?
>>
>> On 10/29/20 6:19 PM, David Villasmil wrote:
>> > No, no to manipulation...
>> >
>> > Regards,
>> >
>> > David Villasmil
>> > email: david.villasmil.w...@gmail.com
>> > 
>> > phone: +34669448337
>> >
>> >
>> > On Thu, Oct 29, 2020 at 9:45 PM Alex Balashov <
>> abalas...@evaristesys.com
>> > > wrote:
>> >
>> > Kamailio shouldn't be touching the To header at all, unless you're
>> > modifying it using uac_replace_to()?
>> >
>> > -- Alex
>> >
>> > On 10/29/20 5:35 PM, David Villasmil wrote:
>> >  > Hello guys,
>> >  >
>> >  > This happened to me a long time ago but i totally forgot the
>> reason.
>> >  >
>> >  > I using a simple dispatcher, and when relaying out to the
>> > destination,
>> >  > kamailio is adding an additional :5060 port to the To header:
>> >  >
>> >  > To: > > :5060>
>> >  >
>> >  > The Destination is actually 172.16.6.1:5080
>> >  , i
>> >  > don't know why Kamailio is adding that :5060
>> >  >
>> >  > The dispatcher is
>> >  >
>> >  >if (!ds_select_dst($var(dispatcher_outbound), "4")) {
>> >  >  xlog("[DISPATCH]: ds_select_dst FAILED!\n");
>> >  >  send_reply("404", "No destination");
>> >  >  exit;
>> >  >  } else {
>> >  >  xlog("[DISPATCH]: ds_select_dst was succesful\n");
>> >  >  }
>> >  >  xlog("L_DBG", "[DISPATCH]: going to <$ru> via <$du>\n");
>> >  >  t_on_failure("RTF_DISPATCH");
>> >  >  route(RELAY);
>> >  >
>> >  > Any ideas? I totally forgot... and it's late, i guess...
>> >  >
>> >  > Thanks!
>> >  >
>> >  > David Villasmil
>> >  > email: david.villasmil.w...@gmail.com
>> > 
>> >  > > > >
>> >  > phone: +34669448337
>> >  >
>> >  > ___
>> >  > 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
>> >
>>
>> --
>> 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


Re: [SR-Users] Double port in TO header

2020-10-29 Thread David Villasmil
I don't know what to think... knowing kamailio it's probably me somehow...

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Thu, Oct 29, 2020 at 10:22 PM Alex Balashov 
wrote:

> So it is your belief that Kamailio is modifying the To header via an
> unknown mechanism?
>
> On 10/29/20 6:19 PM, David Villasmil wrote:
> > No, no to manipulation...
> >
> > Regards,
> >
> > David Villasmil
> > email: david.villasmil.w...@gmail.com
> > 
> > phone: +34669448337
> >
> >
> > On Thu, Oct 29, 2020 at 9:45 PM Alex Balashov  > > wrote:
> >
> > Kamailio shouldn't be touching the To header at all, unless you're
> > modifying it using uac_replace_to()?
> >
> > -- Alex
> >
> > On 10/29/20 5:35 PM, David Villasmil wrote:
> >  > Hello guys,
> >  >
> >  > This happened to me a long time ago but i totally forgot the
> reason.
> >  >
> >  > I using a simple dispatcher, and when relaying out to the
> > destination,
> >  > kamailio is adding an additional :5060 port to the To header:
> >  >
> >  > To:  > :5060>
> >  >
> >  > The Destination is actually 172.16.6.1:5080
> >  , i
> >  > don't know why Kamailio is adding that :5060
> >  >
> >  > The dispatcher is
> >  >
> >  >if (!ds_select_dst($var(dispatcher_outbound), "4")) {
> >  >  xlog("[DISPATCH]: ds_select_dst FAILED!\n");
> >  >  send_reply("404", "No destination");
> >  >  exit;
> >  >  } else {
> >  >  xlog("[DISPATCH]: ds_select_dst was succesful\n");
> >  >  }
> >  >  xlog("L_DBG", "[DISPATCH]: going to <$ru> via <$du>\n");
> >  >  t_on_failure("RTF_DISPATCH");
> >  >  route(RELAY);
> >  >
> >  > Any ideas? I totally forgot... and it's late, i guess...
> >  >
> >  > Thanks!
> >  >
> >  > David Villasmil
> >  > email: david.villasmil.w...@gmail.com
> > 
> >  >  > >
> >  > phone: +34669448337
> >  >
> >  > ___
> >  > 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
> >
>
> --
> 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


Re: [SR-Users] Double port in TO header

2020-10-29 Thread Alex Balashov
So it is your belief that Kamailio is modifying the To header via an 
unknown mechanism?


On 10/29/20 6:19 PM, David Villasmil wrote:

No, no to manipulation...

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com 


phone: +34669448337


On Thu, Oct 29, 2020 at 9:45 PM Alex Balashov > wrote:


Kamailio shouldn't be touching the To header at all, unless you're
modifying it using uac_replace_to()?

-- Alex

On 10/29/20 5:35 PM, David Villasmil wrote:
 > Hello guys,
 >
 > This happened to me a long time ago but i totally forgot the reason.
 >
 > I using a simple dispatcher, and when relaying out to the
destination,
 > kamailio is adding an additional :5060 port to the To header:
 >
 > To: http://sip:910609738@172.31.6.1:5080>:5060>
 >
 > The Destination is actually 172.16.6.1:5080
 , i
 > don't know why Kamailio is adding that :5060
 >
 > The dispatcher is
 >
 >    if (!ds_select_dst($var(dispatcher_outbound), "4")) {
 >          xlog("[DISPATCH]: ds_select_dst FAILED!\n");
 >          send_reply("404", "No destination");
 >          exit;
 >      } else {
 >          xlog("[DISPATCH]: ds_select_dst was succesful\n");
 >      }
 >      xlog("L_DBG", "[DISPATCH]: going to <$ru> via <$du>\n");
 >      t_on_failure("RTF_DISPATCH");
 >      route(RELAY);
 >
 > Any ideas? I totally forgot... and it's late, i guess...
 >
 > Thanks!
 >
 > David Villasmil
 > email: david.villasmil.w...@gmail.com

 > >
 > phone: +34669448337
 >
 > ___
 > 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



--
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


Re: [SR-Users] Double port in TO header

2020-10-29 Thread David Villasmil
No, no to manipulation...

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Thu, Oct 29, 2020 at 9:45 PM Alex Balashov 
wrote:

> Kamailio shouldn't be touching the To header at all, unless you're
> modifying it using uac_replace_to()?
>
> -- Alex
>
> On 10/29/20 5:35 PM, David Villasmil wrote:
> > Hello guys,
> >
> > This happened to me a long time ago but i totally forgot the reason.
> >
> > I using a simple dispatcher, and when relaying out to the destination,
> > kamailio is adding an additional :5060 port to the To header:
> >
> > To: 
> >
> > The Destination is actually 172.16.6.1:5080 , i
> > don't know why Kamailio is adding that :5060
> >
> > The dispatcher is
> >
> >if (!ds_select_dst($var(dispatcher_outbound), "4")) {
> >  xlog("[DISPATCH]: ds_select_dst FAILED!\n");
> >  send_reply("404", "No destination");
> >  exit;
> >  } else {
> >  xlog("[DISPATCH]: ds_select_dst was succesful\n");
> >  }
> >  xlog("L_DBG", "[DISPATCH]: going to <$ru> via <$du>\n");
> >  t_on_failure("RTF_DISPATCH");
> >  route(RELAY);
> >
> > Any ideas? I totally forgot... and it's late, i guess...
> >
> > Thanks!
> >
> > David Villasmil
> > email: david.villasmil.w...@gmail.com
> > 
> > phone: +34669448337
> >
> > ___
> > 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


Re: [SR-Users] Double port in TO header

2020-10-29 Thread Alex Balashov
Kamailio shouldn't be touching the To header at all, unless you're 
modifying it using uac_replace_to()?


-- Alex

On 10/29/20 5:35 PM, David Villasmil wrote:

Hello guys,

This happened to me a long time ago but i totally forgot the reason.

I using a simple dispatcher, and when relaying out to the destination, 
kamailio is adding an additional :5060 port to the To header:


To: 

The Destination is actually 172.16.6.1:5080 , i 
don't know why Kamailio is adding that :5060


The dispatcher is

   if (!ds_select_dst($var(dispatcher_outbound), "4")) {
         xlog("[DISPATCH]: ds_select_dst FAILED!\n");
         send_reply("404", "No destination");
         exit;
     } else {
         xlog("[DISPATCH]: ds_select_dst was succesful\n");
     }
     xlog("L_DBG", "[DISPATCH]: going to <$ru> via <$du>\n");
     t_on_failure("RTF_DISPATCH");
     route(RELAY);

Any ideas? I totally forgot... and it's late, i guess...

Thanks!

David Villasmil
email: david.villasmil.w...@gmail.com 


phone: +34669448337

___
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


[SR-Users] Double port in TO header

2020-10-29 Thread David Villasmil
Hello guys,

This happened to me a long time ago but i totally forgot the reason.

I using a simple dispatcher, and when relaying out to the destination,
kamailio is adding an additional :5060 port to the To header:

To: 

The Destination is actually 172.16.6.1:5080, i don't know why Kamailio is
adding that :5060

The dispatcher is

if (!ds_select_dst($var(dispatcher_outbound), "4")) {
xlog("[DISPATCH]: ds_select_dst FAILED!\n");
send_reply("404", "No destination");
exit;
} else {
xlog("[DISPATCH]: ds_select_dst was succesful\n");
}
xlog("L_DBG", "[DISPATCH]: going to <$ru> via <$du>\n");
t_on_failure("RTF_DISPATCH");
route(RELAY);

Any ideas? I totally forgot... and it's late, i guess...

Thanks!

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users