[SR-Users] set_advertised_address with variable
Patrick Wakano
pwakano at gmail.com
Wed Oct 3 03:28:44 CEST 2018
Thanks for the replies Daniel and Henning!
The problem with the listen address is that it can't be set at run time per
call, for example, after reading the value from the DB.... And also it is
way too dirty to use the set_advertised_address with a static string
value....
Long story short, we have a weird telco setup which only allows the SIP
trunk to terminate in their own network, which then puts my Kamailio behind
a NAT box only for them. And because they are the biggest carrier in that
country, we will have to workaround the issue.....
Kamailio itself has only one network interface to communicate with everyone
(other provider and extensions), so I was trying to actually only set the
advertise address before sending call to this specific telco. For calls to
anyone else I would not set the advertise address. Looks simple, but seems
not that easy to implement.....
Cheers,
Patrick Wakano
On Tue, 2 Oct 2018 at 15:39, Daniel-Constantin Mierla <miconda at gmail.com>
wrote:
> Hello,
>
> the pseudo-variable is read only.
>
> The recommended way would be to use listen with advertise, like:
>
> listen=udp:1.2.3.4:5060 advertise 5.6.7.8:5060
>
> That will take care of both Via and Record-Route headers as well as
> matching myself, no need to do other stuff in route blocks. Doesn't work
> for you?
>
> Cheers,
> Daniel
>
>
> On 01.10.18 22:16, Henning Westerholt wrote:
> > Am Freitag, 28. September 2018, 07:16:18 CEST schrieb Patrick Wakano:
> >> Sorry to annoy again, but I did find a couple of more emails asking
> around
> >> about the possibility to pass a variable to the set_advertised_address,
> but
> >> no one was replied....
> >> How is the status of these old core functions that don't accept
> variables
> >> as parameters? Is it something being worked on?
> > Hi Patrick,
> >
> > about the old core function - I think that indeed some of them are still
> > missing PV support. Regarding your question, have you already tried to
> use
> > this PV:
> >
> >
> https://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#rai_-_received_advertised_ip_address
> >
> > Best regards,
> >
> > Henning
> >
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181003/4dc26f29/attachment.html>
More information about the sr-users
mailing list