[SR-Users] Kamailio sending response to source IP and port from Via ?

Alex Balashov abalashov at evaristesys.com
Thu Oct 27 19:16:37 CEST 2022


That’s controlled by this function. :-)

https://www.kamailio.org/wiki/cookbooks/5.4.x/core#force_rport1

And its cousin, the global parameter (on the same docs page):

https://www.kamailio.org/wiki/cookbooks/5.4.x/core#force_rport

— Alex

> On Oct 27, 2022, at 12:54 PM, Chaigneau, Nicolas <nicolas.chaigneau at capgemini.com> wrote:
> 
> Thanks Alex.
> I didn't have this parameter "reply_to_via" set.
> 
> The documentation says that this parameter controls the IP address to which the reply is sent.
> 
> But what of the port ? it seems the port from the "Via" is always used to send the reply.
> 
> 
> -----Message d'origine-----
> De : sr-users <sr-users-bounces at lists.kamailio.org> De la part de Alex Balashov
> Envoyé : jeudi 27 octobre 2022 18:35
> À : Kamailio (SER) - Users Mailing List
> Objet : Re: [SR-Users] Kamailio sending response to source IP and port from Via ?
> 
> ***This mail has been sent by an external source***
> 
> Ni Nicolas,
> 
> This behaviour is regulated by:
> 
> https://www.kamailio.org/wikidocs/cookbooks/5.6.x/core/#reply_to_via
> 
> — Alex
> 
>> On Oct 27, 2022, at 12:33 PM, Chaigneau, Nicolas <nicolas.chaigneau at capgemini.com> wrote:
>> 
>> Hello,
>> 
>> 
>> I’m using Kamailio in stateless mode to send redirect responses.
>> I’ve noticed that the responses are sent to the packet source IP address, and to the port found in the Via header.
>> 
>> I’m a bit confused. I was expecting the response to be sent to the address and port found in the Via header.
>> 
>> Is it the expected behaviour ?
>> 
>> 
>> I’m using Kamailio 5.5.2.
>> 
>> 
>> Thanks for your help !
>> 
>> Regards,
>> Nicolas.
> This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
> 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/




More information about the sr-users mailing list