Is it possible to insert the current dialog into the profile by using the following way?
modparam("dialog", "profiles_no_value", "mytest;xyz")
$var(profilename)="xyz"; set_dlg_profile(" $var(profilename) ");
Currently it is giving errors and not allowing to use variable instead of static profile name.
Or is there any alternative to pass profile name as variable?
--- Thanks,
Hello,
I haven't checked the code, but I think that the function was designed with static parameter to be able to lookup the profile structure at startup and keep the pointer to it in order to be faster at runtime.
Adding support for variables is possible of course, it would require a bit of c development.
At this moment you can use embedded scripting (e.g., Lua, Python, JavaScript, ... see app_lua, ...) and execute functions via KSR module, i.e.,:
- http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#ks...
Cheers, Daniel
On 08.01.21 07:44, Muhammad Sohaib wrote:
Is it possible to insert the current dialog into the profile by using the following way?
modparam("dialog", "profiles_no_value", "mytest;xyz")
$var(profilename)="xyz"; set_dlg_profile(" $var(profilename) ");
Currently it is giving errors and not allowing to use variable instead of static profile name.
Or is there any alternative to pass profile name as variable?
Thanks,
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Thank you Daniel for the explanation.
I managed to achieve the goal by "profiles_with_value" parameter and passed "$rU" but each user might have multiple numbers so I had to get_profile_size for each number.
However, adding support for variables would be a great help.
I will give a try to the KSA module later.
On Mon, 11 Jan 2021 at 14:56, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
I haven't checked the code, but I think that the function was designed with static parameter to be able to lookup the profile structure at startup and keep the pointer to it in order to be faster at runtime.
Adding support for variables is possible of course, it would require a bit of c development.
At this moment you can use embedded scripting (e.g., Lua, Python, JavaScript, ... see app_lua, ...) and execute functions via KSR module, i.e.,:
http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#ks...
Cheers, Daniel On 08.01.21 07:44, Muhammad Sohaib wrote:
Is it possible to insert the current dialog into the profile by using the following way?
modparam("dialog", "profiles_no_value", "mytest;xyz")
$var(profilename)="xyz"; set_dlg_profile(" $var(profilename) ");
Currently it is giving errors and not allowing to use variable instead of static profile name.
Or is there any alternative to pass profile name as variable?
Thanks,
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 Funding: https://www.paypal.me/dcmierla
Another I would have with using values is performance. Profiles with value are presumably a hash table underneath. If so, wouldn’t stacking a bunch of dialogs under the same value key just result in a small number of long bucket collision chains?
— Sent from mobile, with due apologies for brevity and errors.
On Jan 11, 2021, at 1:45 PM, Muhammad Sohaib geosohaib@gmail.com wrote:
Thank you Daniel for the explanation.
I managed to achieve the goal by "profiles_with_value" parameter and passed "$rU" but each user might have multiple numbers so I had to get_profile_size for each number.
However, adding support for variables would be a great help.
I will give a try to the KSA module later.
On Mon, 11 Jan 2021 at 14:56, Daniel-Constantin Mierla miconda@gmail.com wrote: Hello,
I haven't checked the code, but I think that the function was designed with static parameter to be able to lookup the profile structure at startup and keep the pointer to it in order to be faster at runtime.
Adding support for variables is possible of course, it would require a bit of c development.
At this moment you can use embedded scripting (e.g., Lua, Python, JavaScript, ... see app_lua, ...) and execute functions via KSR module, i.e.,:
Cheers, Daniel
On 08.01.21 07:44, Muhammad Sohaib wrote:
Is it possible to insert the current dialog into the profile by using the following way?
modparam("dialog", "profiles_no_value", "mytest;xyz")
$var(profilename)="xyz"; set_dlg_profile(" $var(profilename) ");
Currently it is giving errors and not allowing to use variable instead of static profile name.
Or is there any alternative to pass profile name as variable?
Thanks,
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 Funding: https://www.paypal.me/dcmierla
-- Thanks, _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Having support for variables for "profiles_no_value" would be more or less the same thing as having a "profiles_with_value" with a key "general" or "default". The gain for adding this functionality would be minimal.
Regards, Ovidiu Sas
On Mon, Jan 11, 2021 at 1:45 PM Muhammad Sohaib geosohaib@gmail.com wrote:
Thank you Daniel for the explanation.
I managed to achieve the goal by "profiles_with_value" parameter and passed "$rU" but each user might have multiple numbers so I had to get_profile_size for each number.
However, adding support for variables would be a great help.
I will give a try to the KSA module later.
On Mon, 11 Jan 2021 at 14:56, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
I haven't checked the code, but I think that the function was designed with static parameter to be able to lookup the profile structure at startup and keep the pointer to it in order to be faster at runtime.
Adding support for variables is possible of course, it would require a bit of c development.
At this moment you can use embedded scripting (e.g., Lua, Python, JavaScript, ... see app_lua, ...) and execute functions via KSR module, i.e.,:
Cheers, Daniel
On 08.01.21 07:44, Muhammad Sohaib wrote:
Is it possible to insert the current dialog into the profile by using the following way?
modparam("dialog", "profiles_no_value", "mytest;xyz")
$var(profilename)="xyz"; set_dlg_profile(" $var(profilename) ");
Currently it is giving errors and not allowing to use variable instead of static profile name.
Or is there any alternative to pass profile name as variable?
Thanks,
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 Funding: https://www.paypal.me/dcmierla
-- Thanks, _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Ovidiu,
See my previously expressed concern about data structures underneath.
— Sent from my iPad
On Jan 11, 2021, at 1:57 PM, Ovidiu Sas osas@voipembedded.com wrote:
Having support for variables for "profiles_no_value" would be more or less the same thing as having a "profiles_with_value" with a key "general" or "default". The gain for adding this functionality would be minimal.
Regards, Ovidiu Sas
On Mon, Jan 11, 2021 at 1:45 PM Muhammad Sohaib geosohaib@gmail.com wrote:
Thank you Daniel for the explanation.
I managed to achieve the goal by "profiles_with_value" parameter and passed "$rU" but each user might have multiple numbers so I had to get_profile_size for each number.
However, adding support for variables would be a great help.
I will give a try to the KSA module later.
On Mon, 11 Jan 2021 at 14:56, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
I haven't checked the code, but I think that the function was designed with static parameter to be able to lookup the profile structure at startup and keep the pointer to it in order to be faster at runtime.
Adding support for variables is possible of course, it would require a bit of c development.
At this moment you can use embedded scripting (e.g., Lua, Python, JavaScript, ... see app_lua, ...) and execute functions via KSR module, i.e.,:
Cheers, Daniel
On 08.01.21 07:44, Muhammad Sohaib wrote:
Is it possible to insert the current dialog into the profile by using the following way?
modparam("dialog", "profiles_no_value", "mytest;xyz")
$var(profilename)="xyz"; set_dlg_profile(" $var(profilename) ");
Currently it is giving errors and not allowing to use variable instead of static profile name.
Or is there any alternative to pass profile name as variable?
Thanks,
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 Funding: https://www.paypal.me/dcmierla
-- Thanks, _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- VoIP Embedded, Inc. http://www.voipembedded.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello Alex,
More or less, the same thing would apply to "profiles_no_value" with variable support. There is a need for a dynamic way to store those dynamic profiles. Maybe we need to add a parameter to control the size of the profile hash table.
-ovidiu
On Mon, Jan 11, 2021 at 2:03 PM Alex Balashov abalashov@evaristesys.com wrote:
Ovidiu,
See my previously expressed concern about data structures underneath.
— Sent from my iPad
On Jan 11, 2021, at 1:57 PM, Ovidiu Sas osas@voipembedded.com wrote:
Having support for variables for "profiles_no_value" would be more or less the same thing as having a "profiles_with_value" with a key "general" or "default". The gain for adding this functionality would be minimal.
Regards, Ovidiu Sas
On Mon, Jan 11, 2021 at 1:45 PM Muhammad Sohaib geosohaib@gmail.com wrote:
Thank you Daniel for the explanation.
I managed to achieve the goal by "profiles_with_value" parameter and passed "$rU" but each user might have multiple numbers so I had to get_profile_size for each number.
However, adding support for variables would be a great help.
I will give a try to the KSA module later.
On Mon, 11 Jan 2021 at 14:56, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
I haven't checked the code, but I think that the function was designed with static parameter to be able to lookup the profile structure at startup and keep the pointer to it in order to be faster at runtime.
Adding support for variables is possible of course, it would require a bit of c development.
At this moment you can use embedded scripting (e.g., Lua, Python, JavaScript, ... see app_lua, ...) and execute functions via KSR module, i.e.,:
Cheers, Daniel
On 08.01.21 07:44, Muhammad Sohaib wrote:
Is it possible to insert the current dialog into the profile by using the following way?
modparam("dialog", "profiles_no_value", "mytest;xyz")
$var(profilename)="xyz"; set_dlg_profile(" $var(profilename) ");
Currently it is giving errors and not allowing to use variable instead of static profile name.
Or is there any alternative to pass profile name as variable?
Thanks,
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 Funding: https://www.paypal.me/dcmierla
-- Thanks, _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- VoIP Embedded, Inc. http://www.voipembedded.com
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