Re: [SR-Users] set_advertised_address not accepting vars
There is an open ticket for that: https://github.com/kamailio/kamailio/issues/2137 On Mon, 23 Mar 2020 at 03:20, Sergiu Pojoga wrote: > Thanks Daniel, I'll give it a try using xavps instead. > > Regards, > --Sergiu > > On Sun, Mar 22, 2020 at 9:52 AM Daniel-Constantin Mierla < > mico...@gmail.com> wrote: > >> Hello, >> >> there is an alternative where you can use a combination of xavps and >> corex module function via_use_xavp_fields() -- see: >> >> * https://www.kamailio.org/wiki/cookbooks/5.3.x/core#xavp_via_fields >> >> I think I looked at some point at set_advertised_address() from core to >> make it accept variables, but its current form does some pre-compilation at >> startup, keeping back references that are used at runtime, so it was not an >> easy update. But we can add new functions to set those xavps and the >> internal flag, if people find it simpler. The old function can stay for >> those that want to work with static values for a bit of more speed. >> >> Cheers, >> Daniel >> >> On 22.03.20 14:07, Sergiu Pojoga wrote: >> >> Hi there, >> >> The function doesn't appear to accept vars. >> >> For example, set_advertised_address("$var(someaddress)") results in a VIA >> of string $var(someaddress), instead of var's value. >> >> https://www.kamailio.org/wiki/cookbooks/5.3.x/core#set_advertised_address >> >> kamailio 5.3.2 (x86_64/linux) 0bed10 >> >> Cheers. >> --Sergiu >> >> ___ >> Kamailio (SER) - Users Mailing >> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> >> -- >> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- >> www.linkedin.com/in/miconda >> >> ___ > 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] set_advertised_address not accepting vars
Thanks Daniel, I'll give it a try using xavps instead. Regards, --Sergiu On Sun, Mar 22, 2020 at 9:52 AM Daniel-Constantin Mierla wrote: > Hello, > > there is an alternative where you can use a combination of xavps and corex > module function via_use_xavp_fields() -- see: > > * https://www.kamailio.org/wiki/cookbooks/5.3.x/core#xavp_via_fields > > I think I looked at some point at set_advertised_address() from core to > make it accept variables, but its current form does some pre-compilation at > startup, keeping back references that are used at runtime, so it was not an > easy update. But we can add new functions to set those xavps and the > internal flag, if people find it simpler. The old function can stay for > those that want to work with static values for a bit of more speed. > > Cheers, > Daniel > > On 22.03.20 14:07, Sergiu Pojoga wrote: > > Hi there, > > The function doesn't appear to accept vars. > > For example, set_advertised_address("$var(someaddress)") results in a VIA > of string $var(someaddress), instead of var's value. > > https://www.kamailio.org/wiki/cookbooks/5.3.x/core#set_advertised_address > > kamailio 5.3.2 (x86_64/linux) 0bed10 > > Cheers. > --Sergiu > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] set_advertised_address not accepting vars
Hello, there is an alternative where you can use a combination of xavps and corex module function via_use_xavp_fields() -- see: * https://www.kamailio.org/wiki/cookbooks/5.3.x/core#xavp_via_fields I think I looked at some point at set_advertised_address() from core to make it accept variables, but its current form does some pre-compilation at startup, keeping back references that are used at runtime, so it was not an easy update. But we can add new functions to set those xavps and the internal flag, if people find it simpler. The old function can stay for those that want to work with static values for a bit of more speed. Cheers, Daniel On 22.03.20 14:07, Sergiu Pojoga wrote: > Hi there, > > The function doesn't appear to accept vars. > > For example, set_advertised_address("$var(someaddress)") results in a > VIA of string $var(someaddress), instead of var's value. > > https://www.kamailio.org/wiki/cookbooks/5.3.x/core#set_advertised_address > > kamailio 5.3.2 (x86_64/linux) 0bed10 > > Cheers. > --Sergiu > > ___ > 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 ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] set_advertised_address not accepting vars
Hi there, The function doesn't appear to accept vars. For example, set_advertised_address("$var(someaddress)") results in a VIA of string $var(someaddress), instead of var's value. https://www.kamailio.org/wiki/cookbooks/5.3.x/core#set_advertised_address kamailio 5.3.2 (x86_64/linux) 0bed10 Cheers. --Sergiu ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users