Module: kamailio Branch: master Commit: 5115ea20322ef32d581c1dd8f581dfd780a5094c URL: https://github.com/kamailio/kamailio/commit/5115ea20322ef32d581c1dd8f581dfd7...
Author: Xenofon Karamanos 22965395+xkaraman@users.noreply.github.com Committer: Henning Westerholt hw@gilawa.com Date: 2024-09-16T13:39:06+02:00
call_control: Remove dlg_flag and update docs
---
Modified: src/modules/call_control/call_control.c Modified: src/modules/call_control/doc/call_control_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/5115ea20322ef32d581c1dd8f581dfd7... Patch: https://github.com/kamailio/kamailio/commit/5115ea20322ef32d581c1dd8f581dfd7...
---
diff --git a/src/modules/call_control/call_control.c b/src/modules/call_control/call_control.c index f1614b04254..41b36eeedd6 100644 --- a/src/modules/call_control/call_control.c +++ b/src/modules/call_control/call_control.c @@ -146,7 +146,6 @@ static AVP_Param sip_application_avp = {
struct dlg_binds dlg_api; -static int dialog_flag = -1;
AVP_List *cc_init_avps = NULL, *cc_start_avps = NULL, *cc_stop_avps = NULL;
@@ -1080,7 +1079,6 @@ static int ki_call_control(sip_msg_t *msg) if(result == 1) { // A call with a time limit that will be traced by callcontrol msg->msg_flags |= FL_USE_CALL_CONTROL; - setflag(msg, dialog_flag); // have the dialog module trace this dialog }
return result; @@ -1171,20 +1169,6 @@ static int mod_init(void) return -1; }
- // load dlg_flag and default_timeout parameters from the dialog module - param = find_param_export( - find_module_by_name("dialog"), "dlg_flag", INT_PARAM, &type); - if(!param) { - LOG(L_CRIT, "cannot find dlg_flag parameter in the dialog module\n"); - return -1; - } - if(type != INT_PARAM) { - LOG(L_CRIT, "dlg_flag parameter found but with wrong type: %d\n", type); - return -1; - } - - dialog_flag = *param; - // register dialog creation callback if(dlg_api.register_dlgcb(NULL, DLGCB_CREATED, __dialog_created, NULL, NULL) != 0) { diff --git a/src/modules/call_control/doc/call_control_admin.xml b/src/modules/call_control/doc/call_control_admin.xml index f673413ed0b..01d56ebe0d4 100644 --- a/src/modules/call_control/doc/call_control_admin.xml +++ b/src/modules/call_control/doc/call_control_admin.xml @@ -410,6 +410,10 @@ route { This function can be used from REQUEST_ROUTE. </para>
+ <note> + The <emphasis>dlg_manage()</emphasis> (dialog module) function must be called in the configuration file before using this function. + </note> + <example> <title>Using the <function>call_control</function> function</title> <programlisting format="linespecific"> @@ -424,6 +428,7 @@ if (is_avp_set("$avp(i:805)")) {
if (method==INVITE && !has_totag() && is_domain_local("$avp(s:billing_party_domain)")) { + dlg_manage(); call_control(); switch ($retcode) { case 2: @@ -460,4 +465,3 @@ t_relay(); </section>
</chapter> -