[SR-Users] kamailio didnt run with acc_json (without dialog module) - kamailio 5.5.2
Daniel-Constantin Mierla
miconda at gmail.com
Mon Nov 1 14:14:58 CET 2021
Hello,
I updated a bit the text in the section, but feel free to make a pull
request to clarify further.
Cheers,
Daniel
On 01.11.21 13:43, Karsten Horsmann wrote:
> Hi List,
>
> okay - i found it myself after reading the code a bit. cdr_enable must
> be 0 if i didnt want to use dialog.so.
> A bit confusing what that parameter described in the documentation.
>
>
> 3.11. |cdr_enable| (str)
>
> Enable Call Data Record generation.
>
> Default value is 0 (disabled).
>
>
> Am Mo., 1. Nov. 2021 um 13:22 Uhr schrieb Karsten Horsmann
> <khorsmann at gmail.com>:
>
> Hi List,
>
> i want to try out acc_json (to syslog). But if i set up
> "cdr_enable", 1 - it breaks the startup of kamailio with that
> error (dialog module is not listed as dependency).
>
> Any hints?
>
> Nov 01 13:13:59 siprouter2 kamailio[22397]: INFO: acc_json
> [acc_json_mod.c:135]: mod_init(): janson version : 2.10
> Nov 01 13:13:59 siprouter2 kamailio[22397]: ERROR: acc_json
> [acc_json_mod.c:204]: mod_init(): can't load dialog API
> Nov 01 13:13:59 siprouter2 kamailio[22397]: ERROR: <core>
> [core/sr_module.c:943]: init_mod(): Error while initializing
> module acc_json (/usr/lib64/kamailio/modules/acc_json.so)
>
>
> #!ifdef WITH_DBTEXT
> loadmodule "db_text.so"
> #!endif
> #!ifndef WITH_DBTEXT
> loadmodule "db_mysql.so"
> #!endif
>
> loadmodule "jsonrpcs.so"
> loadmodule "kex.so"
> loadmodule "corex.so"
> loadmodule "tm.so"
> loadmodule "tmx.so"
> loadmodule "sl.so"
> loadmodule "rr.so"
> loadmodule "pv.so"
> loadmodule "maxfwd.so"
> loadmodule "textops.so"
> loadmodule "siputils.so"
> loadmodule "xlog.so"
> loadmodule "sanity.so"
> loadmodule "ctl.so"
> loadmodule "cfg_rpc.so"
> loadmodule "acc.so"
> loadmodule "dispatcher.so"
> loadmodule "permissions.so"
> loadmodule "avpops.so"
> #!ifdef WITH_ACCJSON
> loadmodule "acc_json.so"
> #!endif
> #!ifdef WITH_DIALPLAN
> loadmodule "dialplan.so"
> modparam("dialplan", "db_url", DBURL)
> modparam("dialplan", "fetch_rows", 1000)
> modparam("dialplan", "attrs_pvar", "$avp(s:dest)")
> #!endif
>
> #!ifdef WITH_JSONSTATS
> loadmodule "xhttp.so"
> loadmodule "jansson.so"
> loadmodule "janssonrpcc.so"
> #!endif
>
> #!ifdef WITH_HOMER
> loadmodule "siptrace.so"
> #!endif
>
> loadmodule "pipelimit.so"
> loadmodule "htable.so"
>
> ....
>
> # ----- acc params -----
> modparam("acc", "log_flag", FLT_ACC)
> modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
> # ----- acc params -----
> #!ifdef WITH_ACCSYSLOG
> modparam("acc", "log_facility", "LOG_LOCAL2")
> modparam("acc", "log_level", 2)
> #!endif
> /* what special events should be accounted ? */
> modparam("acc", "time_mode", 4)
> modparam("acc", "time_attr", "utctime")
> modparam("acc", "time_format", "%Y-%m-%d %H:%M:%S")
> modparam("acc", "acc_time_column", "localtime")
> ## --- to syslog
> modparam("acc", "early_media", 1)
> modparam("acc", "report_ack", 1)
> modparam("acc", "report_cancels", 1)
> /* by default ww do not adjust the direct of the sequential requests.
> * if you enable this parameter, be sure the enable "append_fromtag"
> * in "rr" module */
> modparam("acc", "detect_direction", 0)
> /* account triggers (flags) */
> modparam("acc", "log_flag", FLT_ACC)
> modparam("acc", "log_missed_flag", FLT_ACCMISSED)
> modparam("acc", "log_extra",
> "src_user=$fU;src_domain=$fd;src_ip=$si;"
>
> "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;user_agent=$ua;x_t_call_id=$avp(x-t-call-id);x_routing=$avp(x_routing);x_billing=$avp(x_billing)")
> modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
> /* enhanced DB accounting */
> #!ifdef WITH_ACCDB
> modparam("acc", "db_flag", FLT_ACC)
> modparam("acc", "db_missed_flag", FLT_ACCMISSED)
> modparam("acc", "db_url", DBURL)
> modparam("acc", "db_extra",
> "src_user=$fU;src_domain=$fd;src_ip=$si;"
> "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
> #!endif
>
> #!ifdef WITH_ACCJSON
> modparam("acc_json", "acc_missed_flag", 3)
> modparam("acc_json", "acc_time_mode", 1)
> modparam("acc_json", "cdr_output_syslog", 1)
> modparam("acc_json", "acc_time_format", "%Y/%m/%d %H:%M:%S")
> modparam("acc_json", "acc_log_facility", "LOG_LOCAL1")
> modparam("acc_json", "acc_log_level", 2) # Set acc_log_level to 2
> (L_INFO)
> modparam("acc_json", "cdr_enable", 1)
> #!endif
> ....
>
> version: kamailio 5.5.2 (x86_64/linux) 55e232
> flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
> USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES
> ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144,
> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: 55e232
> compiled on 14:20:31 Aug 25 2021 with gcc 4.8.5
>
> --
> Mit freundlichen Grüßen
> *Karsten Horsmann*
>
>
>
> --
> Mit freundlichen Grüßen
> *Karsten Horsmann*
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> * sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
> * 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
Kamailio Advanced Training - Online
Nov 08-11, 2021 (Europe Timezone) - Nov 22-25, 2021 (America Timezone)
* https://www.asipto.com/sw/kamailio-advanced-training-online/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211101/8a6b6852/attachment.htm>
More information about the sr-users
mailing list