Hello, I don't use cnxcc module, but try with debug=3 in kamailio.cfg and look at syslog messages, maybe you get a hint of what is happening.
Cheers, Daniel On 22/09/15 16:29, Максим Панчоха wrote: > Hello! > I'm trying to set max call duration, but after 5 seconds call is > continues. > Kamailio version: 4.3.2 > Here's part of my config file: > > #!define CC_FLAG 29 > ... > modparam("cnxcc", "credit_check_period", 1) > modparam("cnxcc", "redis", "addr=127.0.0.1;port=6379;db=1") > > modparam("dialog", "hash_size", 2048) > modparam("dialog", "default_timeout", 3600) > modparam("dialog", "db_mode", 0) > modparam("dialog", "dlg_flag", DLG_FLAG) > ... > if ((is_method("INVITE")) && (is_request()) && (!has_totag())) { > route(CNXCC); > } > route[CNXCC] > { > setflag(DLG_FLAG); > if (!is_method("INVITE")) > return; > > $var(client) = $fU; > $var(max_time) = 5; > > if (!cnxcc_set_max_time("$var(client)", "$var(max_time)")) { > xlog("Error setting up credit control"); > return; > } > } > > event_route[dialog:failed] { > xlog("L_INFO", "********END > CALL*********$DLG_lifetime*******************"); > } > > event_route[dialog:end] { > xlog("L_INFO", "******END > CALL************$DLG_lifetime****************"); > } > > event_route[dialog:start] { > xlog("L_INFO", "***********************DIALOG > STARTED****************************"); > } > > event_route[cnxcc:call-shutdown] > { > $var(duration) = $TS - $dlg(start_ts); > xlog("L_INFO", *****END CALL***BALANCE IS > EMPTY************$var(duration)*************"); > } > > > Tell me please, where I made a mistake. > Thank you for a response. > > > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > sr-users@lists.sip-router.org > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Book: SIP Routing With Kamailio - http://www.asipto.com Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - http://asipto.com/u/kat
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users