Hi,
In the docs at http://kamailio.org/docs/modules/3.0.x/modules/tm.html#fr_inv_timer it says that fr_inv_timer_avp should be defined like this, without $ or $avp:
modparam("tm", "fr_inv_timer_avp", "my_fr_inv_timer")
In kam <= 1.5 I did it like that:
modparam("tm", "fr_inv_timer_avp", "$avp(s:callee_fr_inv_timer)")
which doesn't give me an error on startup with kam-3.0 either, but the timer doesn't get fired (I use seconds for that as noted in the docs). If I change it to
modparam("tm", "fr_inv_timer_avp", "callee_fr_inv_timer")
then I get the error "malformed or non AVP callee_fr_inv_timer AVP definition", same with setting it to "s:callee_fr_inv_timer".
Anyhow, it seems to be deprecated anyways, so I'm looking to get t_set_fr() working. I'm just curious how I can use a var or AVP loaded from DB to set the value on-the-fly? t_set_fr(...) seems to allow only constants to be set. Couldn't find anything in the docs regarding that one.
Thanks, Andreas
I noticed this too.
On 04/08/2010 11:11 AM, Andreas Granig wrote:
Hi,
In the docs at http://kamailio.org/docs/modules/3.0.x/modules/tm.html#fr_inv_timer it says that fr_inv_timer_avp should be defined like this, without $ or $avp:
modparam("tm", "fr_inv_timer_avp", "my_fr_inv_timer")
In kam <= 1.5 I did it like that:
modparam("tm", "fr_inv_timer_avp", "$avp(s:callee_fr_inv_timer)")
which doesn't give me an error on startup with kam-3.0 either, but the timer doesn't get fired (I use seconds for that as noted in the docs). If I change it to
modparam("tm", "fr_inv_timer_avp", "callee_fr_inv_timer")
then I get the error "malformed or non AVP callee_fr_inv_timer AVP definition", same with setting it to "s:callee_fr_inv_timer".
Anyhow, it seems to be deprecated anyways, so I'm looking to get t_set_fr() working. I'm just curious how I can use a var or AVP loaded from DB to set the value on-the-fly? t_set_fr(...) seems to allow only constants to be set. Couldn't find anything in the docs regarding that one.
Thanks, Andreas
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On 4/8/10 5:16 PM, Alex Balashov wrote:
I noticed this too.
On 04/08/2010 11:11 AM, Andreas Granig wrote:
Hi,
In the docs at http://kamailio.org/docs/modules/3.0.x/modules/tm.html#fr_inv_timer it says that fr_inv_timer_avp should be defined like this, without $ or $avp:
modparam("tm", "fr_inv_timer_avp", "my_fr_inv_timer")
In kam <= 1.5 I did it like that:
modparam("tm", "fr_inv_timer_avp", "$avp(s:callee_fr_inv_timer)")
if you set config to kamailio compat mode via #!KAMAILIO then it accepts the kamailio format where all avps are specified in PV format: $avp(...). Doc needs some update :-) ...
which doesn't give me an error on startup with kam-3.0 either, but the timer doesn't get fired (I use seconds for that as noted in the docs).
Well, seems to be a bug in code, I thought the timer is set in miliseconds even for avps. It is a incoherence imo, the fr_timer and fr_inv_timer module parameters are in miliseconds, but when given via avps expects seconds, making impossible to have dynamic timeouts less than 1 sec via avp. There is t_set_fr() but would be easier to have all timeouts using same unit.
When #!KAMAILIO is defined and the value of timeout avp is less than 120, then it is multiplied with 1000 (auto-correction from second to milisecond), but since it actually second for AVP case, will result in a very long timeout :-).
I will fix it.
Thanks, Daniel
If I change it to
modparam("tm", "fr_inv_timer_avp", "callee_fr_inv_timer")
then I get the error "malformed or non AVP callee_fr_inv_timer AVP definition", same with setting it to "s:callee_fr_inv_timer".
Anyhow, it seems to be deprecated anyways, so I'm looking to get t_set_fr() working. I'm just curious how I can use a var or AVP loaded from DB to set the value on-the-fly? t_set_fr(...) seems to allow only constants to be set. Couldn't find anything in the docs regarding that one.
Thanks, Andreas
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Daniel-Constantin Mierla writes:
When #!KAMAILIO is defined and the value of timeout avp is less than 120, then it is multiplied with 1000 (auto-correction from second to milisecond), but since it actually second for AVP case, will result in a very long timeout :-).
I will fix it.
i hope your fix don't break my script, where i have not defined #!KAMAILIO.
it is VERY bad to have all these different modes. for 3.1 we should get rid of them and have only one mode. it also makes writing the docs easier, when people can concentrate on one version of the docs instead of two or three.
-- juha
On 4/8/10 10:05 PM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
When #!KAMAILIO is defined and the value of timeout avp is less than 120, then it is multiplied with 1000 (auto-correction from second to milisecond), but since it actually second for AVP case, will result in a very long timeout :-).
I will fix it.
i hope your fix don't break my script, where i have not defined #!KAMAILIO.
no, it is not affected if you don't use #!KAMAILIO.
Let me try to explain what #!KAMAILIO does, so people understand better what happens inside the code: - when you define it, a global variable is set (similar to a global cfg parameter) - inside the code, there are some IF conditions testing the value of this variable, and if matches kamailio, then some particular behaviour is done - the goal of it is to have kind of profile, for compatibility reasons with behaviour of kamailio 1.5. There are about 5 things controlled by it right now
it is VERY bad to have all these different modes.
It is like with global parameters, a good documentation should make it easier...
for 3.1 we should get rid of them and have only one mode. it also makes writing the docs easier, when people can concentrate on one version of the docs instead of two or three.
I agree we should reduce as much as possible, but as said above, it is practically just like another global parameter.
Cheers, Daniel
Daniel-Constantin Mierla writes:
for 3.1 we should get rid of them and have only one mode. it also makes writing the docs easier, when people can concentrate on one version of the docs instead of two or three.
I agree we should reduce as much as possible, but as said above, it is practically just like another global parameter.
there has always been changes in config file from one version to another. in 3.1, there should be only one mode and a documented list of changes that are needed from current K or S modes in order to get config working again.
-- juha
On 4/9/10 6:47 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:
for 3.1 we should get
rid of them and have only one mode. it also makes writing the docs easier, when people can concentrate on one version of the docs instead of two or three.
I agree we should reduce as much as possible, but as said above, it is practically just like another global parameter.
there has always been changes in config file from one version to another. in 3.1, there should be only one mode and a documented list of changes that are needed from current K or S modes in order to get config working again.
Fine with me. IIRC, when we listed the differences, Andrei said that drop behaviour (vs exit) should be made default, the only one that is debatable now is the way branches are handled in serial forking (ie, dropping or not replies of previous branches in serial forking) - this one can get as tm parameter.
Cheers, Daniel
I have to agree with Juha here. In the next major release we should get rid of this flavor stuff. Everyone should bite the bullet and make their old scripts compatible with the new architecture.
-ovidiu
On Thu, Apr 8, 2010 at 4:05 PM, Juha Heinanen jh@tutpro.com wrote:
Daniel-Constantin Mierla writes:
> When #!KAMAILIO is defined and the value of timeout avp is less than > 120, then it is multiplied with 1000 (auto-correction from second to > milisecond), but since it actually second for AVP case, will result in a > very long timeout :-). > > I will fix it.
i hope your fix don't break my script, where i have not defined #!KAMAILIO.
it is VERY bad to have all these different modes. for 3.1 we should get rid of them and have only one mode. it also makes writing the docs easier, when people can concentrate on one version of the docs instead of two or three.
-- juha
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On 04/08/2010 05:06 PM, Ovidiu Sas wrote:
I have to agree with Juha here. In the next major release we should get rid of this flavor stuff. Everyone should bite the bullet and make their old scripts compatible with the new architecture.
Even I will agree with this, and I am very resistant to change by nature.
On 4/8/10 11:06 PM, Alex Balashov wrote:
On 04/08/2010 05:06 PM, Ovidiu Sas wrote:
I have to agree with Juha here. In the next major release we should get rid of this flavor stuff. Everyone should bite the bullet and make their old scripts compatible with the new architecture.
Even I will agree with this, and I am very resistant to change by nature.
Three major aspects seem to be controlled by compat mode: - exit vs drop - in K they are distinct (e.g., drop is different in branch and onreply routes), in SER drop==exit - some bits in tm - avp parms format (in K they use PV format, to be coherent with all other modules), auto-correction of timer parmeters that used to be seconds in K and now are milliseconds and auto-dropping of branches for serial forking - modules' functions fixup attempts - in S mode, fixups based on pseudo-variables are not tried
If there is a way to make everyone happy with a single mode, then I am all for it.
Cheers, Daniel
The thing is that the flavor is controlling the behavior of several module as opposed to params that are controlling the behavior of a single module. For the next release, it would be nice to get rid of it and maybe perform the following: - we should switch to ms for all tm timers; - maybe we should replace 'drop' with 'abort' and properly document this (everyone will be forced to update their configs and maybe rethink the logic); - allow fixups for all modules; and so on ...
Best thing to do would be to create a wiki page with everything that needs to be done in order to get rid of flavor and get input from the community on how to address each issue.
Thanks, Ovidiu
On Thu, Apr 8, 2010 at 6:10 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
On 4/8/10 11:06 PM, Alex Balashov wrote:
On 04/08/2010 05:06 PM, Ovidiu Sas wrote:
I have to agree with Juha here. In the next major release we should get rid of this flavor stuff. Everyone should bite the bullet and make their old scripts compatible with the new architecture.
Even I will agree with this, and I am very resistant to change by nature.
Three major aspects seem to be controlled by compat mode:
- exit vs drop - in K they are distinct (e.g., drop is different in branch
and onreply routes), in SER drop==exit
- some bits in tm - avp parms format (in K they use PV format, to be
coherent with all other modules), auto-correction of timer parmeters that used to be seconds in K and now are milliseconds and auto-dropping of branches for serial forking
- modules' functions fixup attempts - in S mode, fixups based on
pseudo-variables are not tried
If there is a way to make everyone happy with a single mode, then I am all for it.
Cheers, Daniel
-- Daniel-Constantin Mierla * http://www.asipto.com/ * http://twitter.com/miconda * http://www.linkedin.com/in/danielconstantinmierla
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hello,
On 4/9/10 12:41 AM, Ovidiu Sas wrote:
The thing is that the flavor is controlling the behavior of several module as opposed to params that are controlling the behavior of a single module.
it is not the flavour that does it. Or at least we use different terms here. The flavour controls the name of binary, compilation flags, what tools are installed.
This is the config file compatibility mode which does not depend on flavour - no matter what flavour you have, you can use #!KAMAILIO or #!SER (e.g., compile K flavour and have SER config compatibility).
I'm fine with getting rid of script compat directive, but flavours will stay for a while, since there are different db structures and modules for spcific purposes.
Cheers, Daniel
For the next release, it would be nice to get rid of it and maybe perform the following:
- we should switch to ms for all tm timers;
- maybe we should replace 'drop' with 'abort' and properly document
this (everyone will be forced to update their configs and maybe rethink the logic);
- allow fixups for all modules;
and so on ...
Best thing to do would be to create a wiki page with everything that needs to be done in order to get rid of flavor and get input from the community on how to address each issue.
Thanks, Ovidiu
On Thu, Apr 8, 2010 at 6:10 PM, Daniel-Constantin Mierla miconda@gmail.com wrote:
On 4/8/10 11:06 PM, Alex Balashov wrote:
On 04/08/2010 05:06 PM, Ovidiu Sas wrote:
I have to agree with Juha here. In the next major release we should get rid of this flavor stuff. Everyone should bite the bullet and make their old scripts compatible with the new architecture.
Even I will agree with this, and I am very resistant to change by nature.
Three major aspects seem to be controlled by compat mode:
- exit vs drop - in K they are distinct (e.g., drop is different in branch
and onreply routes), in SER drop==exit
- some bits in tm - avp parms format (in K they use PV format, to be
coherent with all other modules), auto-correction of timer parmeters that used to be seconds in K and now are milliseconds and auto-dropping of branches for serial forking
- modules' functions fixup attempts - in S mode, fixups based on
pseudo-variables are not tried
If there is a way to make everyone happy with a single mode, then I am all for it.
Cheers, Daniel
-- Daniel-Constantin Mierla * http://www.asipto.com/ * http://twitter.com/miconda * http://www.linkedin.com/in/danielconstantinmierla
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Andreas Granig writes:
Anyhow, it seems to be deprecated anyways, so I'm looking to get t_set_fr() working. I'm just curious how I can use a var or AVP loaded from DB to set the value on-the-fly? t_set_fr(...) seems to allow only constants to be set. Couldn't find anything in the docs regarding that one.
for example, this kind of call works for me:
t_set_fr("$avp(i:722)", "@cfg_get.local.phone_timeout");
-- juha
On 4/8/10 5:35 PM, Andreas Granig wrote:
Juha,
Juha Heinanen wrote:
for example, this kind of call works for me:
t_set_fr("$avp(i:722)", "@cfg_get.local.phone_timeout");
Thanks. I was doing it wrong, namely without the double-quotes. D'oh.
I committed on git master and kamailio_3.0 a fix that should take the value of timeout from AVP in seconds. If you can test and tell if works for you, would be appreciated.
Thanks, Daniel