Thanks again Sergiu,
/Hmmm... if dialog params are wrapped in a ifdef condition, then do you have something like #!define WITH_DIALOG at the top?/
But the #!define WITH_DIALOG is to choose between loading module parameters or not loading module parameters...
When you do not add #!ifdef WITH_XXX before the parameters and #!endif after, then those parameters will be loaded when starting Kamailio.
So, I still have the issue that the profile is not being loaded.
I have tried renaming the profiles, in the route and the parameters, but that does not make a difference..
# ---- Dialog params ------------- modparam("dialog", "default_timeout", 7200) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_flag", DLG_FLAG) modparam("dialog", "hash_size", 4096) #modparam("dialog", "detect_spirals", 1) modparam("dialog", "profiles_with_value", "inbound ; outbound")
route[CONCURRENT_IN] { #Add call to customer profile #Check if customer has not reached inbound call limit
#Get max concurrent calls sql_query("cc", "select max_calls_in from calllimit where cust_id='$avp(custid)'", "ra"); $avp(maxcalls)=$dbr(ra=>[0,0]); sql_result_free("ra"); $avp(concurrent) = 0; get_profile_size("inbound", "$avp(custid)", "$avp(concurrent)"); if( $avp(concurrent) >= $var(max) ) { xlog("L_INFO"," Call limit reached for customer $avp(custid)\r\n "); sl_send_reply("503", "No Lines Available"); exit; } set_dlg_profile("inbound", "$avp(custid)");
return; }
But this still results in:
Dec 5 09:34:33 proxy01 /usr/local/sbin/kamailio[75755]: CRITICAL: dialog [dialog.c:391]: fixup_profile(): profile <inbound> not defined Dec 5 09:34:33 proxy01 /usr/local/sbin/kamailio[75755]: ERROR: <core> [core/route.c:1166]: fix_actions(): fixing failed (code=-6) at cfg:/usr/local/etc/kamailio/kamailio.cfg:1578
Maybe it’s a copy paste error...
Try removing the spaces in the modparam “profiles_with_value” setting
On Sat, Dec 5, 2020 at 00:51 Gertjan Wolzak gertjan.wolzak@upcmail.nl wrote:
Thanks again Sergiu,
*Hmmm... if dialog params are wrapped in a ifdef condition, then do you have something like #!define WITH_DIALOG at the top?*
But the #!define WITH_DIALOG is to choose between loading module parameters or not loading module parameters...
When you do not add #!ifdef WITH_XXX before the parameters and #!endif after, then those parameters will be loaded when starting Kamailio.
So, I still have the issue that the profile is not being loaded.
I have tried renaming the profiles, in the route and the parameters, but that does not make a difference..
# ---- Dialog params ------------- modparam("dialog", "default_timeout", 7200) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_flag", DLG_FLAG) modparam("dialog", "hash_size", 4096) #modparam("dialog", "detect_spirals", 1) modparam("dialog", "profiles_with_value", "inbound ; outbound")
route[CONCURRENT_IN] { #Add call to customer profile #Check if customer has not reached inbound call limit
#Get max concurrent calls sql_query("cc", "select max_calls_in from calllimit where
cust_id='$avp(custid)'", "ra"); $avp(maxcalls)=$dbr(ra=>[0,0]); sql_result_free("ra"); $avp(concurrent) = 0; get_profile_size("inbound", "$avp(custid)", "$avp(concurrent)"); if( $avp(concurrent) >= $var(max) ) { xlog("L_INFO"," Call limit reached for customer $avp(custid)\r\n "); sl_send_reply("503", "No Lines Available"); exit; } set_dlg_profile("inbound", "$avp(custid)");
return;
}
But this still results in:
Dec 5 09:34:33 proxy01 /usr/local/sbin/kamailio[75755]: CRITICAL: dialog [dialog.c:391]: fixup_profile(): profile <inbound> not defined Dec 5 09:34:33 proxy01 /usr/local/sbin/kamailio[75755]: ERROR: <core> [core/route.c:1166]: fix_actions(): fixing failed (code=-6) at cfg:/usr/local/etc/kamailio/kamailio.cfg:1578
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users