[RADIATOR] Some information lost during Diameter to Radius conversion
Arthur
kasjas at hot.ee
Tue Apr 1 06:12:09 CDT 2014
31.03.2014 16:16, Heikki Vatiainen kirjutas:
> On 03/31/2014 10:30 AM, Arthur wrote:
>
>> SDP-Session-Description: VM., v=0
>> SDP-Session-Description: VM., o=- 640284584 403958478 IN IP4
>> 94.50.86.245
>> SDP-Session-Description: VM., s=-
>> SDP-Session-Description: VM., c=IN IP4 94.50.120.5
>> SDP-Session-Description: VM., t=0 0
>>
>> I have tried to add the following code to my hook for enumerating all
>> entries and making fake attributes like 'SDP-Session-Description-n':
>>
>> my $ims_info = $si->get_attr(876, 10415); # IMS-Information (grouped)
>> my $nn;
>> if (my @avpair = $ims_info->get_attr(842, 10415)) { #
> Try get_attrs() instead of get_attr(). This Diameter attribute list
> works differently here, that is, get_attr does not check if the caller
> expects a list or a single value.
Thanks, much better now.
One mystery (or bug?) needs explaining, though.
I have the following Diameter request part:
Wireshark:
AVP: Ericsson-Service-Information(285) l=264 f=V-- vnd=Ericsson
AVP: MMT-Information(1061) l=224 f=V-- vnd=Ericsson
AVP: Calling-Party-Address-Presentation-Status(1141) l=16 f=V--
vnd=Ericsson val=0
AVP: Called-Asserted-Identity-Presentation-Status(1142) l=16
f=V-- vnd=Ericsson val=0
AVP: SIP-Ringing-Timestamp-Fraction(1256) l=16 f=V-- vnd=Ericsson
val=437
AVP: From-Header(1153) l=82 f=V-- vnd=Ericsson val="3000"
<sip:3000 at xxxx.xx>;tag=h7g4
AVP: From-Header-Presentation-Status(1262) l=16 f=V--
vnd=Ericsson val=0
AVP: Service-Number-Type(1307) l=16 f=V-- vnd=Ericsson val=2
Radiator 4.12.1 debug log:
Ericsson-Service-Information: V..,
MMT-Information: V..,
Calling-Party-Address-Presentation-Status: V.., 0
Called-Asserted-Identity-Presentation-Status: V.., 0
SIP-Ringing-Timestamp-Fractions: V.., 437
From-Header = ""3000" <sip:3000 at xxxx.xx>;tag=h7g4"
From-Header-Presentation-Status: V.., 0
Service-Number-Type: V.., 2
And with hook's construction like:
if (my $eee_info = $d->get_attr(285, 193)) {
if (my $mmt_info = $eee_info->get_attr(1061, 193)) {
if (my $caips = $mmt_info->get_attr(1141, 193)) {
$r->add_attr('Calling-Party-Address-Presentation-Status', $caips);
}
}
}
works only with "Service-Number-Type" and "From-Header" AVP converting.
To make converting to work I had to modify hook's construction to:
if (my $eee_info = $d->get_attr(285, 193)) {
if (my $mmt_info = $eee_info->get_attr(1061, 193)) {
if (my @caips = $mmt_info->get_attrs(1141, 193)) {
$r->add_attr('Calling-Party-Address-Presentation-Status', @caips[0]);
}
}
}
Is there any logical explanation?
br,
Arthur
More information about the radiator
mailing list