Hey Victor,
I tested yes, and in this case I can indeed see the json data in the response.

I was just wondering why we have that check: (msg->id != current_msg_id_repl), since the current_msg_id_repl was only increased inside the pv_set_response, which is never called in my scenario.


Daniel



From: Victor Seva <linuxmaniac@torreviejawireless.org>
Sent: Thursday, December 12, 2024 12:17 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Cc: Grotti, Daniel <daniel.grotti@hpe.com>
Subject: Re: [SR-Users] Re: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
 
Hi Daniel!

Can you try with this change: https://github.com/kamailio/kamailio/compare/master...vseva/ims_diameter_server?

Cheers,
Victor

On 12/12/24 9:19, Grotti, Daniel via sr-users wrote:
> Hi,
> the problem seems to be in the pv_get_response function:
>
>
> --- a/src/modules/ims_diameter_server/avp_helper.c
> +++ b/src/modules/ims_diameter_server/avp_helper.c
>   int pv_get_response(struct sip_msg *msg, pv_param_t *param, pv_value_t *res) {
> -       if ((msg->id != current_msg_id_repl) || (responsejson.len < 0)) {
> +       if (responsejson.len < 0) {
>          return pv_get_strval(msg, param, res, &responsejson);
>
>
> where the msg->id is set to "1" when the request is sent while current_msg_id_repl is always set to zero.
> I found a similar report here: https://github.com/kamailio/kamailio/issues/2035#issuecomment-1673511815 <https://github.com/kamailio/kamailio/issues/2035#issuecomment-1673511815>
>
> Daniel

--
-----------------------------------------------------------------
|   ,''`.                                             Victor Seva |
|  : :' :                      linuxmaniac@torreviejawireless.org |
|  `. `'  PGP: 8F19 CADC D42A 42D4 5563  730C 51A0 9B18 CF5A 5068 |
|    `-                                          Debian Developer |
  -----------------------------------------------------------------