[SR-Users] set_advertised_address not accepting vars

Patrick Wakano pwakano at gmail.com
Sun Mar 22 22:43:57 CET 2020


There is an open ticket for that:
https://github.com/kamailio/kamailio/issues/2137


On Mon, 23 Mar 2020 at 03:20, Sergiu Pojoga <pojogas at gmail.com> 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 <
> miconda at 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 at 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 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/20200323/6e33ac72/attachment.html>


More information about the sr-users mailing list