Hello,
do not reply to private email only when it is about a discussion on the mailing list - such messages will be ignored.
Try to store the value in an avp when processing the BYE, after loose_route(), and store that avp in acc.
Daniel
On 10/15/12 1:13 PM, Nord7 wrote:
Hello, no I'm not getting error messages. Problem: I can not get kamailio record duration dialogue created field "duration". I make a test call, answer it, wait 5-6 seconds and hang up. Now I have to get 5-6 seconds duration in the "duration", but the field is blank. The rest of the field information about the call is entered correctly. So the variable $ DLG_lifetime information about the duration of the call does not get. But most of all I am wrong somewhere.
2012/10/15 Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com>
Hello, do you get any error message or what is the problem you encounter? Cheers, Daniel On 10/15/12 10:14 AM, Nord7 wrote:
Hello Kamailio 3.3.0 All default "extra fields" created in database. I create in Database new field "duration" and trying write in this field variable $DLG_lifetime (from dialog module) , but can't do this. What i'm doing wrong? installed modules: ACC, DIALOG # ----- acc params ----- /* what special events should be accounted ? */ modparam("acc", "early_media", 0) modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 0) modparam("acc", "detect_direction", 0) /* account triggers (flags) */ modparam("acc", "log_level", 1) 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;" "duration=$DLG_lifetime") modparam("acc", "failed_transaction_flag", FLT_ACCFAILED) /* enhanced DB accounting */ 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;" /* extra fields created in DataBase */ "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;" "duration=$DLG_lifetime") modparam("acc", "cdr_enable", 1) modparam("acc", "cdr_start_on_confirmed", 0) modparam("acc", "cdr_facility", "LOG_DAEMON") # ----- dialog params ----- modparam("dialog", "enable_stats", 1) modparam("dialog", "hash_size", 4096) modparam("dialog", "rr_param", "did") modparam("dialog", "dlg_flag", DLG_FLAG) /* DLG_FLAG=4 */ modparam("dialog", "default_timeout", 21600) modparam("dialog", "timeout_avp", "$avp(i:10)") modparam("dialog", "dlg_match_mode", 0) modparam("dialog", "detect_spirals", 1) modparam("dialog", "db_url", DBURL) modparam("dialog", "db_mode", 1) modparam("dialog", "db_fetch_rows", 500) ########Routing Logic######## route[RELAY] { # enable additional event routes for forwarded requests # - serial forking, RTP relaying handling, a.s.o. if (is_method("INVITE|SUBSCRIBE")) { t_on_branch("MANAGE_BRANCH"); t_on_reply("MANAGE_REPLY"); } if (is_method("INVITE")) { t_on_failure("MANAGE_FAILURE"); } setflag(DLG_FLAG); # flag 4 duration setflag(FLT_ACC); # do accounting ... setflag(FLT_ACCFAILED); # ... even if the transaction fails if (!t_relay()) { sl_reply_error(); } exit; } _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org <mailto:sr-users@lists.sip-router.org> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -http://www.asipto.com http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 -http://asipto.com/u/katu
Hello,
In ACC module i'm set extra field "duration=$avp(i:256)" and added after "lose_route", in method "BYE" $avp_printf("$avp(i:256)", "$DLG_lifetime") function. Now after call, in databasse field "duration" i have text "<null>". If i set function like this: $avp_printf("$avp(i:256)", "TEST") all is okay, database field "duration" receive "TEST". Something wrong in dialog module configuration? Any suggestions.
MY CHANGES:: ------- acc params ------ modparam("acc", "log_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;" "duration=$DLG_lifetime") modparam("acc", "db_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;" /* extra fields created in DataBase */ "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;" "duration=$avp(i:256)")
-----route-----
route[WITHINDLG] { <------>if (has_totag()) { <------><------># sequential request withing a dialog should <------><------># take the path determined by record-routing <------><------>if (loose_route()) { <------><------><------>if (is_method("BYE")) { <------><------><------><------>setflag(DLG_FLAG); <------><------><------><------>avp_printf("$avp(i:256)", "$DLG_lifetime"); <------><------><------><------>setflag(FLT_ACC); # do accounting ... <------><------><------><------>setflag(FLT_ACCFAILED); # ... even if the transaction fails <------><------><------>} <------><------><------>if ( is_method("ACK") ) { <------><------><------><------># ACK is forwarded statelessy <------><------><------><------>route(NATMANAGE); <------><------><------>} <------><------><------>route(RELAY); <------><------>} else { ... Best regards, Kirill Ushakov
2012/10/15 Daniel-Constantin Mierla miconda@gmail.com
Hello,
do not reply to private email only when it is about a discussion on the mailing list - such messages will be ignored.
Try to store the value in an avp when processing the BYE, after loose_route(), and store that avp in acc.
Daniel
On 10/15/12 1:13 PM, Nord7 wrote:
Hello, no I'm not getting error messages. Problem: I can not get kamailio record duration dialogue created field "duration". I make a test call, answer it, wait 5-6 seconds and hang up. Now I have to get 5-6 seconds duration in the "duration", but the field is blank. The rest of the field information about the call is entered correctly. So the variable $ DLG_lifetime information about the duration of the call does not get. But most of all I am wrong somewhere.
2012/10/15 Daniel-Constantin Mierla miconda@gmail.com
Hello,
do you get any error message or what is the problem you encounter?
Cheers, Daniel
On 10/15/12 10:14 AM, Nord7 wrote:
Hello
Kamailio 3.3.0 All default "extra fields" created in database. I create in Database new field "duration" and trying write in this field variable $DLG_lifetime (from dialog module) , but can't do this. What i'm doing wrong?
installed modules: ACC, DIALOG # ----- acc params ----- /* what special events should be accounted ? */ modparam("acc", "early_media", 0) modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 0) modparam("acc", "detect_direction", 0) /* account triggers (flags) */ modparam("acc", "log_level", 1) 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;" "duration=$DLG_lifetime") modparam("acc", "failed_transaction_flag", FLT_ACCFAILED) /* enhanced DB accounting */ 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;" /* extra fields created in DataBase */ "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;" "duration=$DLG_lifetime") modparam("acc", "cdr_enable", 1) modparam("acc", "cdr_start_on_confirmed", 0) modparam("acc", "cdr_facility", "LOG_DAEMON")
# ----- dialog params ----- modparam("dialog", "enable_stats", 1) modparam("dialog", "hash_size", 4096) modparam("dialog", "rr_param", "did") modparam("dialog", "dlg_flag", DLG_FLAG) /* DLG_FLAG=4 */ modparam("dialog", "default_timeout", 21600) modparam("dialog", "timeout_avp", "$avp(i:10)") modparam("dialog", "dlg_match_mode", 0) modparam("dialog", "detect_spirals", 1) modparam("dialog", "db_url", DBURL) modparam("dialog", "db_mode", 1) modparam("dialog", "db_fetch_rows", 500)
########Routing Logic########
route[RELAY] {
# enable additional event routes for forwarded requests # - serial forking, RTP relaying handling, a.s.o. if (is_method("INVITE|SUBSCRIBE")) { t_on_branch("MANAGE_BRANCH"); t_on_reply("MANAGE_REPLY"); } if (is_method("INVITE")) { t_on_failure("MANAGE_FAILURE"); } setflag(DLG_FLAG); # flag 4 duration setflag(FLT_ACC); # do accounting ... setflag(FLT_ACCFAILED); # ... even if the transaction fails if (!t_relay()) { sl_reply_error(); } exit;
}
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu