Hello Fiorix!
I am trying to make GoDiameter to communicate with freeDiameter respectively.
However, received CEA includes three application Ids and one unknown AVP.
Despite DIAMETER_SUCCESS (2001) , freeDiameter fails to parse the response correctly.
freeDiameter Log:
18:02:54 NOTI SND to 'cgrates-poc.opencloud.com':
18:02:54 NOTI 'Capabilities-Exchange-Request'
18:02:54 NOTI Version: 0x01
18:02:54 NOTI Length: 212
18:02:54 NOTI Flags: 0x80 (R---)
18:02:54 NOTI Command Code: 257
18:02:54 NOTI ApplicationId: 0
18:02:54 NOTI Hop-by-Hop Identifier: 0x1BFA6EE1
18:02:54 NOTI End-to-End Identifier: 0x8E10F059
18:02:54 NOTI {internal data}: src:(nil)(0) rwb:(nil) rt:0 cb:(nil),(nil)((nil)) qry:(nil) asso:0 sess:(nil)
18:02:54 NOTI AVP: 'Origin-Host'(264) l=34 f=-M val="freediameter.opencloud.com"
18:02:54 NOTI AVP: 'Origin-Realm'(296) l=21 f=-M val="opencloud.com"
18:02:54 NOTI AVP: 'Origin-State-Id'(278) l=12 f=-M val=1492441313 (0x58f4d8e1)
18:02:54 NOTI AVP: 'Host-IP-Address'(257) l=14 f=-M val=10.224.228.36
18:02:54 NOTI AVP: 'Vendor-Id'(266) l=12 f=-M val=0 (0x0)
18:02:54 NOTI AVP: 'Product-Name'(269) l=20 f=-- val="freeDiameter"
18:02:54 NOTI AVP: 'Firmware-Revision'(267) l=12 f=-- val=10201 (0x27d9)
18:02:54 NOTI AVP: 'Inband-Security-Id'(299) l=12 f=-M val='NO_INBAND_SECURITY' (0 (0x0))
18:02:54 NOTI AVP: 'Acct-Application-Id'(259) l=12 f=-M val=3 (0x3)
18:02:54 NOTI AVP: 'Auth-Application-Id'(258) l=12 f=-M val=4294967295 (0xffffffff)
18:02:54 NOTI AVP: 'Supported-Vendor-Id'(265) l=12 f=-M val=5535 (0x159f)
18:02:54 NOTI AVP: 'Supported-Vendor-Id'(265) l=12 f=-M val=10415 (0x28af)
18:02:54 DBG 'STATE_WAITCNXACK' -> 'STATE_WAITCEA' 'cgrates-poc.opencloud.com'
18:02:54 NOTI Unsupported mandatory AVP found
18:02:54 ERROR Unsupported AVP: 0(not searched in dictionary) l=12 f=-M val=(not set)
18:02:54 ERROR ERROR: in '((parsedict_do_avp(dict, ((struct avp *)(avpch->o)), mandatory, error_info)))' : Operation not supported
18:02:54 ERROR ERROR: in '((parsedict_do_avp(dict, ((struct avp *)(avpch->o)), mandatory, error_info)))' : Operation not supported
18:02:54 NOTI RCV from 'cgrates-poc.opencloud.com':
18:02:54 NOTI 'Capabilities-Exchange-Answer'
18:02:54 NOTI Version: 0x01
18:02:54 NOTI Length: 228
18:02:54 NOTI Flags: 0x00 (----)
18:02:54 NOTI Command Code: 257
18:02:54 NOTI ApplicationId: 0
18:02:54 NOTI Hop-by-Hop Identifier: 0x1BFA6EE1
18:02:54 NOTI End-to-End Identifier: 0x8E10F059
18:02:54 NOTI {internal data}: src:cgrates-poc.opencloud.com(25) rwb:0x7f8ffc0019f0 rt:0 cb:(nil),(nil)((nil)) qry:0x7f90040012f0 asso:0 sess:(nil)
18:02:54 NOTI AVP: 'Result-Code'(268) l=12 f=-M val='DIAMETER_SUCCESS' (2001 (0x7d1))
18:02:54 NOTI AVP: 'Origin-Host'(264) l=19 f=-M val="cgrates-poc"
18:02:54 NOTI AVP: 'Origin-Realm'(296) l=21 f=-M val="opencloud.com"
18:02:54 NOTI AVP: 'Host-IP-Address'(257) l=14 f=-M val=10.224.228.186
18:02:54 NOTI AVP: 'Vendor-Id'(266) l=12 f=-M val=0 (0x0)
18:02:54 NOTI AVP: 'Product-Name'(269) l=19 f=-- val="Golant-data"
18:02:54 NOTI AVP: 'Origin-State-Id'(278) l=12 f=-M val=1492441313 (0x58f4d8e1)
18:02:54 NOTI AVP: 'Acct-Application-Id'(259) l=12 f=-M val=3 (0x3)
18:02:54 NOTI AVP: 'Auth-Application-Id'(258) l=12 f=-M val=4 (0x4)
18:02:54 NOTI AVP: 'Auth-Application-Id'(258) l=12 f=-M val=1 (0x1)
18:02:54 NOTI AVP: 'Supported-Vendor-Id'(265) l=12 f=-M val=10415 (0x28af)
18:02:54 NOTI AVP: 'Vendor-Specific-Application-Id'(260) l=32 f=-M val=(grouped)
18:02:54 NOTI AVP: 'Vendor-Id'(266) l=12 f=-M val=10415 (0x28af)
18:02:54 NOTI AVP: 0(not searched in dictionary) l=12 f=-M val=(not set)
18:02:54 NOTI AVP: 267(not searched in dictionary) l=12 f=-- val=(not set)
18:02:54 NOTI Unsupported mandatory AVP found
Trace:
Diameter Protocol
Version: 0x01
Length: 196
Flags: 0x00
Command Code: 257 Capabilities-Exchange
ApplicationId: Diameter Common Messages (0)
Hop-by-Hop Identifier: 0x5ff41e87
End-to-End Identifier: 0xc68a0593
[Request In: 124]
[Response Time: 0.000189000 seconds]
AVP: Result-Code(268) l=12 f=-M- val=DIAMETER_SUCCESS (2001)
AVP: Origin-Host(264) l=19 f=-M- val=cgrates-poc
AVP: Origin-Realm(296) l=21 f=-M- val=opencloud.com
AVP: Host-IP-Address(257) l=14 f=-M- val=10.224.228.186
AVP: Vendor-Id(266) l=12 f=-M- val=10415
AVP: Product-Name(269) l=19 f=--- val=Golant-data
AVP: Origin-State-Id(278) l=12 f=-M- val=1492106344
AVP: Acct-Application-Id(259) l=12 f=-M- val=Diameter Base Accounting (3)
AVP: Auth-Application-Id(258) l=12 f=-M- val=Diameter Credit Control Application (4)
AVP: Auth-Application-Id(258) l=12 f=-M- val=NASREQ Application (1)
**AVP: Unknown(0) l=12 f=-M- val=00000004**
AVP: Firmware-Revision(267) l=12 f=--- val=918
From the documentation, I understand that actually four dictionaries (applications) are pre-loaded in.
Embedded dictionaries:
- Base Protocol RFC 6733
- Credit Control RFC 4006
- Network Access Server RFC 7155
- 3GPP specific AVPs from TS 32.299 version 12.7.0 <=== What is that exactly and what is used for ?
I am a newbie in diameter world, but I feel, it could be related to to RFC3588 and "Vendor-Specific-Application-Id" grouped AVP.
Could you kindly point me towards the reason why that particular unknown AVP appears in the answer and which dictionary could possibly make freeDiameter understand that?
Is there a way to disable those specific AVPs from being added to CEA, since I only need DCCA?
Just tried to comment out the following in the autogen.sh file, and running it, then building the project.
// Default is a Parser object with pre-loaded
// Base Protocol and Credit Control dictionaries.
var Default *Parser
func init() {
Default, _ = NewParser()
// Default.Load(bytes.NewReader([]byte(baseXML)))
Default.Load(bytes.NewReader([]byte(creditcontrolXML)))
// Default.Load(bytes.NewReader([]byte(networkaccessserverXML)))
// Default.Load(bytes.NewReader([]byte(tgpprorfXML)))
}
The AVP is removed, but freeDiameter rejects the session without base dictionary, so, I think it is mandatory.
This is more like a question, still not sure where is the exact issue.
Please assist,
Thanks in advance,