Hi Zoltan, i've added something like this for the IMS-Charging Module in order to retrieve the "full" Charging Response:
case -1: #failure xlog("L_ERR", "CCR failure - error response sent from module\n"); switch ($avp(s:cca_result_code)){ case 5030: send_reply("403", "Charging User not found"); break; case 5031: send_reply("403", "Rating failed"); break; 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; } (it's in the Master repo/example: https://github.com/kamailio/kamailio/blob/master/misc/examples/scscf/kamailio.cfg) In addition, I have a generic Diameter Client/Server Module, which unfortunately was not finished for Kamailio 5 (development branch is frozen at the moment), but in that case, you'll have to do all the processing yourself. We currently use it as a "Diameter Adapter", which takes a Diameter Request and forwards it through a message bus to worker processes (acting as a HSS). Thanks, Carsten 2017-01-06 18:47 GMT+01:00 Zoltán Miricz <zoltan.mir...@gmail.com>: > Hi, > > Is somebody ever tried to manipulate and retrieve AVP variables from the > Sent/Received Diameter Messages via Config file? > Thank you very much in advance! > > Cheers, > Zoltan > > On 4 January 2017 at 20:37, Zoltán Miricz <zoltan.mir...@gmail.com> wrote: >> >> >> Dear All, >> >> I'm wondering is it possible to catch Diameter Messages and their AVP >> values from kamailio.cfg just like for SIP messages? (Using pseudo >> variables) >> >> I looked into this function from the attached S-CSCF example. >> >> route[REG_MAR_REPLY] >> { >> >> #this is async so to know status we have to check the reply avp >> >> xlog("L_DBG","maa_return code is $avp(s:maa_return_code)\n"); >> >> Sadly it gives back only 1, -1, -2. (which is based on cxdx_mar.c the rc) >> What I mainly looking for is the EXPERIMENTAL_RESULT (experimental_rc) and >> some different AVP values besides. >> >> >> Thank you very much in advance! >> >> Cheers, >> Zoltan > > > > _______________________________________________ > 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 > -- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Millerntorplatz 1 20359 Hamburg / Germany http://www.ng-voice.com mailto:cars...@ng-voice.com Office +49 40 5247593-40 Fax +49 40 5247593-99 Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284 Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/ _______________________________________________ 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