[SR-Users] - w_ro_ccr(): Unable to find dialog and cannot do Ro charging without it

Angelo Colucci angelo.colucci at welcomeitalia.it
Thu Feb 8 18:33:29 CET 2018


Hello Everyone,

I’m new in Kamailio environment. We trying to setup a  IMS Credit Control Client as per RFC 4006. 

We’ve trying to implement the suggesting configuration in ims_charging module doc.

The Kamailio version is 5.1.1 Stable.

The Server is configured with two local users (A and B) registered on local mysql database.

 
The scenario is the following:

1.       In the request_route object we trying to intercept the first INVITE and trigger

a diameter credit control request using Ro_CCR function.

2.       When A calls B without triggering mechanism the call is fine.

3.       When A calls B with credit control triggering, the calls failed and the diamater request is not generated.

 
In the debug we find the following error:

 
exec: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=540 a=25 n=xlog

ERROR: <script>: Individuato primo INVITE: generata nuova transazione

exec: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=541 a=63 n=assign

exec: *** cfgtrace:request_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=541 a=29 n=Ro_CCR

DEBUG: ims_charging [ims_charging_mod.c:494]: w_ro_ccr(): Ro CCR initiated: direction:orig, reservation_units:30, route_name:CHARGING_CCR_REPLY, incoming_trunk_id:1 outgoing_trunk_id:1

DEBUG: ims_dialog [dlg_hash.c:926]: internal_get_dlg(): no dialog callid='yH5kdBGSrM6CowdkkRHTUw..' found

DEBUG: ims_dialog [dlg_hash.c:956]: get_dlg(): no dialog callid='yH5kdBGSrM6CowdkkRHTUw..' found

DEBUG: ims_dialog [dlg_handlers.c:1950]: dlg_get_msg_dialog(): dlg with callid 'yH5kdBGSrM6CowdkkRHTUw..' not found

ERROR: ims_charging [ims_charging_mod.c:511]: w_ro_ccr(): Unable to find dialog and cannot do Ro charging without it

 
The error indicates that w_ro_ccr function doesn’t find any dialog.

Following you can find the relative configuration of kamailio.cfg. The request_route block is equal to default configuration except the following command:

 
#!define WITH_MYSQL

#!define WITH_AUTH

#!define WITH_USRLOCDB

#!define WITH_DEBUG

 
loadmodule "cdp"

loadmodule "cdp_avp"

loadmodule "ims_charging"

loadmodule "ims_dialog"

 
 
modparam("ims_charging", "origin_host", "kcc-t-lu-03.mnc049.mcc222.3gppnetwork.org") 

modparam("ims_charging", "origin_realm", "mnc049.mcc222.3gppnetwork.org")

modparam("ims_charging", "destination_realm", "mnc049.mcc222.3gppnetwork.org")

modparam("ims_charging","interim_update_credits",30)

modparam("ims_charging","timer_buffer",5)

# -- ims_dialog params --

modparam("ims_dialog", "dlg_flag", FLT_DIALOG)

 
request_route {

 
…
if (is_method("INVITE")) {

setflag(FLT_ACC); # do accounting

            t_newtran();

            $var(cc_ret) = Ro_CCR("CHARGING_CCR_REPLY", "orig", 30, "1", "1");

            if ($var(cc_ret) < 0) {

                xlog("Chiamata a Ro_CCR() fallita\n");

                sl_send_reply("402","Payment required");

                exit;

            }

     }  

…
}

 
route[CHARGING_CCR_REPLY]{

    xlog("cca_return code is $avp(s:cca_return_code): $avp(s:cca_result_code)\n");

    switch ($avp(s:cca_return_code)){

        case 1: #success

            break;

        case -1: #failure

            switch ($avp(s:cca_result_code)){

                case 4010:

                    send_reply("402", "Payment required - Unsufficient funds");

                    break;

                case 5006:

                    send_reply("486", "Line limit exceeded");

                    break;

                default:

                    send_reply("402","Payment required ($avp(s:cca_result_code))");

                    break;

            }

        default:

            xlog("L_ERR", "Unknown return code from CCR: [$avp(s:cca_return_code)] \n");

            send_reply("500", "Charging Error");

            break;

        }

}

 
What's goes wrong?

Thanks in advance

Angelo Colucci

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180208/8e17763b/attachment.html>


More information about the sr-users mailing list