Hi list, I'm using kamailio 5.8 and playing with the ims_diameter_server module, by sending an async diameter request and trying to catch the reponse. Following the documentation, I'm sending the request with:
route[SEND_ACR] { route(PREPARE_ACR); diameter_request_async("3", "271", "$var(json_acr)"); } route[PREPARE_ACR] { # here I build the AVP list in JSON $var(json_acr) = "[{"avpCode":277,"vendorId":0,"Flags":64,"int32":0},{...},{...}]"; } event_route[diameter:response] { xlog("Reply to diameter request is: '$diameter_response'\n"); }
The ACR request is successfully sent and the the server is replying with ACA. The list of AVP are properly parsed, but when I enter the event_route to print the response, I get the $diameter_response = 'null':
2024-12-11T10:52:39.192951872+00:00 stderr F 11(19) DEBUG: cdp [worker.c:374]: worker_process(): worker_process(): [2] got task Q(2/2) 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP((nil) < 0x7ff827633810 >0x7ff8276338c0);code=263,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=52; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633810 < 0x7ff8276338c0 >0x7ff827633970);code=268,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=3;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276338c0 < 0x7ff827633970 >0x7ff827633a20);code=264,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=37; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633970 < 0x7ff827633a20 >0x7ff8276340b0);code=296,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=33; 2024-12-11T10:52:39.193124627+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633a20 < 0x7ff8276340b0 >0x7ff827634160);code=259,flags=40; 2024-12-11T10:52:39.193124627+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276340b0 < 0x7ff827634160 >0x7ff827634210);code=480,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634160 < 0x7ff827634210 >0x7ff8276342c0);code=485,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634210 < 0x7ff8276342c0 >(nil));code=85,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193612877+00:00 stderr F 11(19) INFO: <script>: [event_route]: Reply to diameter request is: '<null>'
Is there something I miss to set/configure?
Thanks, Daniel
Daniel Grotti
Development Team Leader, Private 5G
daniel.grotti@hpe.commailto:daniel.grotti@hpe.com
Hewlett Packard Enterprise
HPE.com [cid:803b85f7-01fe-4c9c-a069-74d14a9ea122]
Hello,
just to double check, you’ve setup the diameter “3” peer in your CDP configuration? Do you see any diameter request created on the network level with tracing tools?
Cheers,
Henning
From: Grotti, Daniel via sr-users sr-users@lists.kamailio.org Sent: Wednesday, December 11, 2024 12:58 PM To: sr-users@lists.kamailio.org Cc: Grotti, Daniel daniel.grotti@hpe.com Subject: [SR-Users] ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi list, I'm using kamailio 5.8 and playing with the ims_diameter_server module, by sending an async diameter request and trying to catch the reponse. Following the documentation, I'm sending the request with:
route[SEND_ACR] { route(PREPARE_ACR); diameter_request_async("3", "271", "$var(json_acr)"); } route[PREPARE_ACR] { # here I build the AVP list in JSON $var(json_acr) = "[{"avpCode":277,"vendorId":0,"Flags":64,"int32":0},{...},{...}]"; } event_route[diameter:response] { xlog("Reply to diameter request is: '$diameter_response'\n"); }
The ACR request is successfully sent and the the server is replying with ACA. The list of AVP are properly parsed, but when I enter the event_route to print the response, I get the $diameter_response = 'null':
2024-12-11T10:52:39.192951872+00:00 stderr F 11(19) DEBUG: cdp [worker.c:374]: worker_process(): worker_process(): [2] got task Q(2/2) 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP((nil) < 0x7ff827633810 >0x7ff8276338c0);code=263,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=52; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633810 < 0x7ff8276338c0 >0x7ff827633970);code=268,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=3;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276338c0 < 0x7ff827633970 >0x7ff827633a20);code=264,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=37; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633970 < 0x7ff827633a20 >0x7ff8276340b0);code=296,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=33; 2024-12-11T10:52:39.193124627+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633a20 < 0x7ff8276340b0 >0x7ff827634160);code=259,flags=40; 2024-12-11T10:52:39.193124627+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276340b0 < 0x7ff827634160 >0x7ff827634210);code=480,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634160 < 0x7ff827634210 >0x7ff8276342c0);code=485,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634210 < 0x7ff8276342c0 >(nil));code=85,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193612877+00:00 stderr F 11(19) INFO: <script>: [event_route]: Reply to diameter request is: '<null>'
Is there something I miss to set/configure?
Thanks, Daniel
Daniel Grotti
Development Team Leader, Private 5G
daniel.grotti@hpe.commailto:daniel.grotti@hpe.com
Hewlett Packard Enterprise
HPE.com [cid:image001.png@01DB4BE8.4DA2C390]
Hi Henning, yes I can see the ACR request sent out with wireshark as well as I can see the ACA response coming in from the offline charging server. I see kamailo parsing the AVPs of the responses too, but when I print the PV, I get null value.
Daniel
________________________________ From: Henning Westerholt hw@gilawa.com Sent: Wednesday, December 11, 2024 4:18 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Grotti, Daniel daniel.grotti@hpe.com Subject: RE: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hello,
just to double check, you’ve setup the diameter “3” peer in your CDP configuration?
Do you see any diameter request created on the network level with tracing tools?
Cheers,
Henning
From: Grotti, Daniel via sr-users sr-users@lists.kamailio.org Sent: Wednesday, December 11, 2024 12:58 PM To: sr-users@lists.kamailio.org Cc: Grotti, Daniel daniel.grotti@hpe.com Subject: [SR-Users] ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi list,
I'm using kamailio 5.8 and playing with the ims_diameter_server module, by sending an async diameter request and trying to catch the reponse.
Following the documentation, I'm sending the request with:
route[SEND_ACR]
{
route(PREPARE_ACR);
diameter_request_async("3", "271", "$var(json_acr)");
}
route[PREPARE_ACR]
{
# here I build the AVP list in JSON
$var(json_acr) = "[{"avpCode":277,"vendorId":0,"Flags":64,"int32":0},{...},{...}]";
}
event_route[diameter:response] {
xlog("Reply to diameter request is: '$diameter_response'\n");
}
The ACR request is successfully sent and the the server is replying with ACA.
The list of AVP are properly parsed, but when I enter the event_route to print the response, I get the $diameter_response = 'null':
2024-12-11T10:52:39.192951872+00:00 stderr F 11(19) DEBUG: cdp [worker.c:374]: worker_process(): worker_process(): [2] got task Q(2/2) 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP((nil) < 0x7ff827633810 >0x7ff8276338c0);code=263,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=52; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633810 < 0x7ff8276338c0 >0x7ff827633970);code=268,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=3;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276338c0 < 0x7ff827633970 >0x7ff827633a20);code=264,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=37; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633970 < 0x7ff827633a20 >0x7ff8276340b0);code=296,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=33; 2024-12-11T10:52:39.193124627+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633a20 < 0x7ff8276340b0 >0x7ff827634160);code=259,flags=40; 2024-12-11T10:52:39.193124627+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276340b0 < 0x7ff827634160 >0x7ff827634210);code=480,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634160 < 0x7ff827634210 >0x7ff8276342c0);code=485,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634210 < 0x7ff8276342c0 >(nil));code=85,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193612877+00:00 stderr F 11(19) INFO: <script>: [event_route]: Reply to diameter request is: '<null>'
Is there something I miss to set/configure?
Thanks,
Daniel
Daniel Grotti
Development Team Leader, Private 5G
daniel.grotti@hpe.commailto:daniel.grotti@hpe.com
Hewlett Packard Enterprise
HPE.com [cid:image001.png@01DB4BE8.4DA2C390]
Hello Daniel,
might be a bug, I did not used this module recently.
I have looked quickly to the code, its rather straightforward. For a test, is the synchronous sending working maybe?
Cheers,
Henning
From: Grotti, Daniel daniel.grotti@hpe.com Sent: Wednesday, December 11, 2024 4:31 PM To: Henning Westerholt hw@gilawa.com; Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi Henning, yes I can see the ACR request sent out with wireshark as well as I can see the ACA response coming in from the offline charging server. I see kamailo parsing the AVPs of the responses too, but when I print the PV, I get null value.
Daniel
________________________________ From: Henning Westerholt <hw@gilawa.commailto:hw@gilawa.com> Sent: Wednesday, December 11, 2024 4:18 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Cc: Grotti, Daniel <daniel.grotti@hpe.commailto:daniel.grotti@hpe.com> Subject: RE: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hello,
just to double check, you’ve setup the diameter “3” peer in your CDP configuration?
Do you see any diameter request created on the network level with tracing tools?
Cheers,
Henning
From: Grotti, Daniel via sr-users <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Sent: Wednesday, December 11, 2024 12:58 PM To: sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org Cc: Grotti, Daniel <daniel.grotti@hpe.commailto:daniel.grotti@hpe.com> Subject: [SR-Users] ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi list,
I'm using kamailio 5.8 and playing with the ims_diameter_server module, by sending an async diameter request and trying to catch the reponse.
Following the documentation, I'm sending the request with:
route[SEND_ACR]
{
route(PREPARE_ACR);
diameter_request_async("3", "271", "$var(json_acr)");
}
route[PREPARE_ACR]
{
# here I build the AVP list in JSON
$var(json_acr) = "[{"avpCode":277,"vendorId":0,"Flags":64,"int32":0},{...},{...}]";
}
event_route[diameter:response] {
xlog("Reply to diameter request is: '$diameter_response'\n");
}
The ACR request is successfully sent and the the server is replying with ACA.
The list of AVP are properly parsed, but when I enter the event_route to print the response, I get the $diameter_response = 'null':
2024-12-11T10:52:39.192951872+00:00 stderr F 11(19) DEBUG: cdp [worker.c:374]: worker_process(): worker_process(): [2] got task Q(2/2) 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP((nil) < 0x7ff827633810 >0x7ff8276338c0);code=263,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=52; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633810 < 0x7ff8276338c0 >0x7ff827633970);code=268,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=3;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276338c0 < 0x7ff827633970 >0x7ff827633a20);code=264,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=37; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633970 < 0x7ff827633a20 >0x7ff8276340b0);code=296,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=33; 2024-12-11T10:52:39.193124627+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633a20 < 0x7ff8276340b0 >0x7ff827634160);code=259,flags=40; 2024-12-11T10:52:39.193124627+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276340b0 < 0x7ff827634160 >0x7ff827634210);code=480,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634160 < 0x7ff827634210 >0x7ff8276342c0);code=485,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634210 < 0x7ff8276342c0 >(nil));code=85,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193612877+00:00 stderr F 11(19) INFO: <script>: [event_route]: Reply to diameter request is: '<null>'
Is there something I miss to set/configure?
Thanks,
Daniel
Daniel Grotti
Development Team Leader, Private 5G
daniel.grotti@hpe.commailto:daniel.grotti@hpe.com
Hewlett Packard Enterprise
HPE.com [cid:image001.png@01DB4BEB.F4681060]
Hi, looks like a bug indeed, I could not even print the other PV variables in the event_route, the kamailio is crashing.
I will have a look at the code, thanks.
Daniel
________________________________ From: Henning Westerholt hw@gilawa.com Sent: Wednesday, December 11, 2024 4:48 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Grotti, Daniel daniel.grotti@hpe.com Subject: RE: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hello Daniel,
might be a bug, I did not used this module recently.
I have looked quickly to the code, its rather straightforward. For a test, is the synchronous sending working maybe?
Cheers,
Henning
From: Grotti, Daniel daniel.grotti@hpe.com Sent: Wednesday, December 11, 2024 4:31 PM To: Henning Westerholt hw@gilawa.com; Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi Henning,
yes I can see the ACR request sent out with wireshark as well as I can see the ACA response coming in from the offline charging server.
I see kamailo parsing the AVPs of the responses too, but when I print the PV, I get null value.
Daniel
________________________________
From: Henning Westerholt <hw@gilawa.commailto:hw@gilawa.com> Sent: Wednesday, December 11, 2024 4:18 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Cc: Grotti, Daniel <daniel.grotti@hpe.commailto:daniel.grotti@hpe.com> Subject: RE: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hello,
just to double check, you’ve setup the diameter “3” peer in your CDP configuration?
Do you see any diameter request created on the network level with tracing tools?
Cheers,
Henning
From: Grotti, Daniel via sr-users <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Sent: Wednesday, December 11, 2024 12:58 PM To: sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org Cc: Grotti, Daniel <daniel.grotti@hpe.commailto:daniel.grotti@hpe.com> Subject: [SR-Users] ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi list,
I'm using kamailio 5.8 and playing with the ims_diameter_server module, by sending an async diameter request and trying to catch the reponse.
Following the documentation, I'm sending the request with:
route[SEND_ACR]
{
route(PREPARE_ACR);
diameter_request_async("3", "271", "$var(json_acr)");
}
route[PREPARE_ACR]
{
# here I build the AVP list in JSON
$var(json_acr) = "[{"avpCode":277,"vendorId":0,"Flags":64,"int32":0},{...},{...}]";
}
event_route[diameter:response] {
xlog("Reply to diameter request is: '$diameter_response'\n");
}
The ACR request is successfully sent and the the server is replying with ACA.
The list of AVP are properly parsed, but when I enter the event_route to print the response, I get the $diameter_response = 'null':
2024-12-11T10:52:39.192951872+00:00 stderr F 11(19) DEBUG: cdp [worker.c:374]: worker_process(): worker_process(): [2] got task Q(2/2) 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP((nil) < 0x7ff827633810 >0x7ff8276338c0);code=263,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=52; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633810 < 0x7ff8276338c0 >0x7ff827633970);code=268,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=3;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276338c0 < 0x7ff827633970 >0x7ff827633a20);code=264,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=37; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633970 < 0x7ff827633a20 >0x7ff8276340b0);code=296,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=33; 2024-12-11T10:52:39.193124627+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633a20 < 0x7ff8276340b0 >0x7ff827634160);code=259,flags=40; 2024-12-11T10:52:39.193124627+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276340b0 < 0x7ff827634160 >0x7ff827634210);code=480,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634160 < 0x7ff827634210 >0x7ff8276342c0);code=485,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634210 < 0x7ff8276342c0 >(nil));code=85,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193612877+00:00 stderr F 11(19) INFO: <script>: [event_route]: Reply to diameter request is: '<null>'
Is there something I miss to set/configure?
Thanks,
Daniel
Daniel Grotti
Development Team Leader, Private 5G
daniel.grotti@hpe.commailto:daniel.grotti@hpe.com
Hewlett Packard Enterprise
HPE.com [cid:image001.png@01DB4BEB.F4681060]
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
Daniel
________________________________ From: Grotti, Daniel via sr-users sr-users@lists.kamailio.org Sent: Wednesday, December 11, 2024 4:53 PM To: Henning Westerholt hw@gilawa.com; Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Grotti, Daniel daniel.grotti@hpe.com Subject: [SR-Users] Re: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi, looks like a bug indeed, I could not even print the other PV variables in the event_route, the kamailio is crashing.
I will have a look at the code, thanks.
Daniel
________________________________ From: Henning Westerholt hw@gilawa.com Sent: Wednesday, December 11, 2024 4:48 PM To: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Cc: Grotti, Daniel daniel.grotti@hpe.com Subject: RE: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hello Daniel,
might be a bug, I did not used this module recently.
I have looked quickly to the code, its rather straightforward. For a test, is the synchronous sending working maybe?
Cheers,
Henning
From: Grotti, Daniel daniel.grotti@hpe.com Sent: Wednesday, December 11, 2024 4:31 PM To: Henning Westerholt hw@gilawa.com; Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi Henning,
yes I can see the ACR request sent out with wireshark as well as I can see the ACA response coming in from the offline charging server.
I see kamailo parsing the AVPs of the responses too, but when I print the PV, I get null value.
Daniel
________________________________
From: Henning Westerholt <hw@gilawa.commailto:hw@gilawa.com> Sent: Wednesday, December 11, 2024 4:18 PM To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Cc: Grotti, Daniel <daniel.grotti@hpe.commailto:daniel.grotti@hpe.com> Subject: RE: ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hello,
just to double check, you’ve setup the diameter “3” peer in your CDP configuration?
Do you see any diameter request created on the network level with tracing tools?
Cheers,
Henning
From: Grotti, Daniel via sr-users <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Sent: Wednesday, December 11, 2024 12:58 PM To: sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org Cc: Grotti, Daniel <daniel.grotti@hpe.commailto:daniel.grotti@hpe.com> Subject: [SR-Users] ims_diameter_server: $diameter_response PV is null in the event_route[diameter:response]
Hi list,
I'm using kamailio 5.8 and playing with the ims_diameter_server module, by sending an async diameter request and trying to catch the reponse.
Following the documentation, I'm sending the request with:
route[SEND_ACR]
{
route(PREPARE_ACR);
diameter_request_async("3", "271", "$var(json_acr)");
}
route[PREPARE_ACR]
{
# here I build the AVP list in JSON
$var(json_acr) = "[{"avpCode":277,"vendorId":0,"Flags":64,"int32":0},{...},{...}]";
}
event_route[diameter:response] {
xlog("Reply to diameter request is: '$diameter_response'\n");
}
The ACR request is successfully sent and the the server is replying with ACA.
The list of AVP are properly parsed, but when I enter the event_route to print the response, I get the $diameter_response = 'null':
2024-12-11T10:52:39.192951872+00:00 stderr F 11(19) DEBUG: cdp [worker.c:374]: worker_process(): worker_process(): [2] got task Q(2/2) 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP((nil) < 0x7ff827633810 >0x7ff8276338c0);code=263,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=52; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633810 < 0x7ff8276338c0 >0x7ff827633970);code=268,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=3;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276338c0 < 0x7ff827633970 >0x7ff827633a20);code=264,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=37; 2024-12-11T10:52:39.193026280+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633970 < 0x7ff827633a20 >0x7ff8276340b0);code=296,flags=40; 2024-12-11T10:52:39.193026280+00:00 stderr F DataType=1;VendorID=0;DataLen=33; 2024-12-11T10:52:39.193124627+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827633a20 < 0x7ff8276340b0 >0x7ff827634160);code=259,flags=40; 2024-12-11T10:52:39.193124627+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff8276340b0 < 0x7ff827634160 >0x7ff827634210);code=480,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634160 < 0x7ff827634210 >0x7ff8276342c0);code=485,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193286132+00:00 stderr F 11(19) DEBUG: ims_diameter_server [avp_helper.c:60]: avp2json(): AVP(0x7ff827634210 < 0x7ff8276342c0 >(nil));code=85,flags=40; 2024-12-11T10:52:39.193286132+00:00 stderr F DataType=0;VendorID=0;DataLen=4; 2024-12-11T10:52:39.193612877+00:00 stderr F 11(19) INFO: <script>: [event_route]: Reply to diameter request is: '<null>'
Is there something I miss to set/configure?
Thanks,
Daniel
Daniel Grotti
Development Team Leader, Private 5G
daniel.grotti@hpe.commailto:daniel.grotti@hpe.com
Hewlett Packard Enterprise
HPE.com [cid:image001.png@01DB4BEB.F4681060]
Hi Daniel!
Can you try with this change: https://github.com/kamailio/kamailio/compare/master...vseva/ims_diameter_ser...
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
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_ser...
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 | -----------------------------------------------------------------
Hi Daniel,
On 12/12/24 12:24, Grotti, Daniel wrote:
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.
https://github.com/kamailio/kamailio/pull/4069 is merged now. I will backport it to 5.8
Cheers
Thank you Victor!
Daniel ________________________________ From: Victor Seva linuxmaniac@torreviejawireless.org Sent: Saturday, December 14, 2024 8:40 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,
On 12/12/24 12:24, Grotti, Daniel wrote:
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.
https://github.com/kamailio/kamailio/pull/4069 is merged now. I will backport it to 5.8
Cheers
-- ----------------------------------------------------------------- | ,''`. Victor Seva | | : :' : linuxmaniac@torreviejawireless.org | | `. `' PGP: 8F19 CADC D42A 42D4 5563 730C 51A0 9B18 CF5A 5068 | | `- Debian Developer | -----------------------------------------------------------------