[sr-dev] [kamailio] Acc_Radius Ack packet and acc run egines bug- Kamailo 4.2.5 (#266)

Yasin notifications at github.com
Mon Jul 27 14:45:19 CEST 2015


i added my sample. repor_ack is setted in acc. i set flags for each INVITE packet. 


#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3

#!ifdef WITH_ACCDB
modparam("acc", "cdr_enable", 1)
modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 1)
modparam("acc", "report_cancels", 1)
modparam("acc", "detect_direction", 0)
modparam("acc", "db_url", DBURLCDR)
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "db_missed_flag", FLT_ACCMISSED)
modparam("acc", "db_table_missed_calls", "missed_calls")
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 3)
modparam("acc", "acc_time_column", "calldatetime")
modparam("acc", "time_mode", 2)
modparam("acc", "time_exten", "micorsecs")
modparam("acc", "time_attr", "seconds")
modparam("acc", "db_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_domain=$rd;src_ousername=$avp(poparty);networkdatetime=$avp(networkdatetime);dst_ouser=$avp(ptparty);provider=$avp(pprovider);m_id=$avp(maliyet_id);tibtip=$avp(tibtip);src_userid=$avp(userid);dst_userid=$avp(dst_userid);flags=$avp(ucrflag);op_kodu=$avp(op_kodu);lifetime=$avp(i:77);uniqueid=$avp(unique_id)")
#!endif


#!ifdef WITH_RAD
modparam("acc_radius", "radius_config","/etc/radiusclient-ng/radiusclient.conf")
modparam("acc_radius", "radius_flag", FLT_ACC)
modparam("acc_radius", "radius_missed_flag", FLT_ACCMISSED)
modparam("acc_radius", "service_type", 15)
modparam("acc_radius", "radius_extra", "src_ip=$si;Sip-Uri-User=$fu;provider=$avp(pprovider);uniqueid=$avp(unique_id);src_user=$fU;dst_user=$rU;dst_domain=$rd;src_ousername=$avp(poparty);networkdatetime=$avp(networkdatetime);dst_ouser=$avp(ptparty);m_id=$avp(maliyet_id);tibtip=$avp(tibtip);src_userid=$avp(userid);dst_userid=$avp(dst_userid);flags=$avp(ucrflag);op_kodu=$avp(op_kodu);lifetime=$avp(i:77)")

modparam("misc_radius", "radius_config", "/etc/radiusclient-ng/radiusclient.conf")
modparam("misc_radius", "group_service_type", 12)
modparam("misc_radius", "uri_service_type", 10)
modparam("misc_radius", "caller_service_type", 30)
modparam("misc_radius", "callee_service_type", 31)
#Arayan
modparam("misc_radius", "caller_extra", "Calling-Station-Id=$ci;Acct-Status-Type=$avp(ucrflag);Acct-Multi-Session-Id=$rU;Acct-Session-Id=$avp(servis)")
#Aranan
modparam("misc_radius", "callee_extra", "Called-Station-Id=$ci;Acct-Status-Type=$avp(ucrflag);Acct-Multi-Session-Id=$rU;Acct-Session-Id=$avp(servis)")


modparam("misc_radius", "uri_extra", "Called-Station-Id=$tu")
modparam("misc_radius", "common_response", 0)

#!endif


# Handle requests within SIP dialogs
route[WITHINDLG] {
        if (has_totag()) {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
                        route(DLGURI);
                        if (is_method("BYE")) {
                                setflag(FLT_ACC); # do accounting ...
                                setflag(FLT_ACCFAILED); # ... even if the transaction fails
                        }
                        else if ( is_method("ACK") ) {
                                # ACK is forwarded statelessy
                                route(NATMANAGE);
                        }
                        else if ( is_method("NOTIFY") ) {
                                # Add Record-Route for in-dialog NOTIFY as per RFC 6665.
                                record_route();
                        }
                        route(RELAY);
...

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/266#issuecomment-125192524
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20150727/fd3b938a/attachment.html>


More information about the sr-dev mailing list