In kamailio < 5.1.x it used to be possible to get total number of items in a dialog_with_profile by skipping the "value" paramter, such as:
modparam ( "dialog", "profiles_with_value", "outbound" ) . . . get_profile_size ( "outbound", "$var(myvar)" );
However, 5.1.x and 5.2.x report:
ERROR: dialog [dialog.c:912]: w_get_profile_size_helper(): invalid value parameter
The documentation ( https://kamailio.org/docs/modules/5.2.x/modules/dialog.html#dialog.f.get_pro... )
Indicates the "value" paramter is still optional.
I'm sure I must be missing something obvious... Any ideas?
Thanks!
Does the same occur in a profile without values? It may be that the wrappers were fixed up to mandate use of values in profiles that are keyed by values.
On Mon, Jul 15, 2019 at 05:45:06PM -0400, Nathan Angelacos wrote:
In kamailio < 5.1.x it used to be possible to get total number of items in a dialog_with_profile by skipping the "value" paramter, such as:
modparam ( "dialog", "profiles_with_value", "outbound" ) . . . get_profile_size ( "outbound", "$var(myvar)" );
However, 5.1.x and 5.2.x report:
ERROR: dialog [dialog.c:912]: w_get_profile_size_helper(): invalid value parameter
The documentation ( https://kamailio.org/docs/modules/5.2.x/modules/dialog.html#dialog.f.get_pro... )
Indicates the "value" paramter is still optional.
I'm sure I must be missing something obvious... Any ideas?
Thanks!
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On Mon, 2019-07-15 at 18:06 -0400, Alex Balashov wrote:
Does the same occur in a profile without values? It may be that the wrappers were fixed up to mandate use of values in profiles that are keyed by values.
No. I should have included that detail:
modparam ( "dialog", "profiles_no_value", "inbound" ) modparam ( "dialog", "profiles_with_value", "outbound" ) . . . get_profile_size ( "inbound", "$var(in)"); get_profile_size ( "outbound", "$var(out)");
The "inbound" line works, the second does not.
My quick look at the source points me in that direction - that "value" is now required... which is a pity. (imho)
On Mon, Jul 15, 2019 at 06:10:24PM -0400, Nathan Angelacos wrote:
My quick look at the source points me in that direction - that "value" is now required... which is a pity. (imho)
It may have to do with the underlying data structure and relevant performance characteristics.
You can easily get around this by adding the dialogs simultaneously to multiple profiles, including one that does not have values alongside one that does.