Hello list, Hope you all doing fine!
I am using version 5.0.7 and I was trying to use the set_advertised_address with an avp variable but it does not replace with the avp value.... I then find out this thread https://lists.kamailio.org/pipermail/sr-users/2016-March/092327.html, in which is mentioned:
*"I expect those functions not to support pvs, but I think this issomething to address in 5.0 and get all core functions working with pvs."*
Looks like this was actually not done.... is that correct? Is there any plan to do it? In my case I want to use the set_advertised_address after reading the value from DB, so I can't use the advertised_address or listen options.... Any idea on how I could achieve that?
Thank you, Kind regards, 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?
Kind regards, Patrick Wakano
On Thu, 27 Sep 2018 at 18:17, Patrick Wakano pwakano@gmail.com wrote:
Hello list, Hope you all doing fine!
I am using version 5.0.7 and I was trying to use the set_advertised_address with an avp variable but it does not replace with the avp value.... I then find out this thread https://lists.kamailio.org/pipermail/sr-users/2016-March/092327.html, in which is mentioned:
*"I expect those functions not to support pvs, but I think this issomething to address in 5.0 and get all core functions working with pvs."*
Looks like this was actually not done.... is that correct? Is there any plan to do it? In my case I want to use the set_advertised_address after reading the value from DB, so I can't use the advertised_address or listen options.... Any idea on how I could achieve that?
Thank you, Kind regards, Patrick Wakano
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...
Best regards,
Henning
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...
Best regards,
Henning
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@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...
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@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
yesterday afternoon I pushed an alternative for allowing setting the address and port in local Via headers using XAVP, see:
- https://www.kamailio.org/wiki/cookbooks/devel/core#xavp_via_fields
I didn't have the time to do any tests, but was in master before freezing code for 5.2.x series, so it will be in the next major release. Test and if there is any bug, report and it will be fixed.
I also looked at extending the set_advertised_address(), but it actually uses pointers to some static values available at kamailio startup, so making that dynamic would have been more complex to do in a short time.
Cheers, Daniel
On 03.10.18 03:28, Patrick Wakano wrote:
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@gmail.com mailto:miconda@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 <http://1.2.3.4:5060> advertise 5.6.7.8:5060 <http://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 <http://www.asipto.com> www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio World Conference -- www.kamailioworld.com <http://www.kamailioworld.com> Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com <http://www.asipto.com> _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel! Thanks for the effort! Really appreciate it! I am not using the 5.2 version yet, so it I won't be able to test it right away...
Best regards, Patrick Wakano
On Fri, 5 Oct 2018 at 18:37, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
yesterday afternoon I pushed an alternative for allowing setting the address and port in local Via headers using XAVP, see:
I didn't have the time to do any tests, but was in master before freezing code for 5.2.x series, so it will be in the next major release. Test and if there is any bug, report and it will be fixed.
I also looked at extending the set_advertised_address(), but it actually uses pointers to some static values available at kamailio startup, so making that dynamic would have been more complex to do in a short time.
Cheers, Daniel
On 03.10.18 03:28, Patrick Wakano wrote:
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@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...
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@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.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