fiorix / go-diameter

Diameter stack and Base Protocol (RFC 6733) for the Go programming language
Other
252 stars 143 forks source link

Diameter Client receving CCA #184

Closed helioaymoto closed 11 months ago

helioaymoto commented 11 months ago

Hi, Trying to get a Diameter Client - Credit-Control, where I have been able to send the CCR Initial based on example code client.go, but even registering the mux to handle CCA: mux.Handle("CCA", handleCCA(done)) I am getting the error: Could not find preloaded Command with code 272 From what I understood, in v4 the Credit-Control dicitionay is part of the default dictionary and i have read the same in some comments like: // Load our custom dictionary on top of the default one, which // always have the Base Protocol (RFC6733) and Credit Control // Application (RFC4006).

Is it possible to get some support?

fiorix commented 11 months ago

The error indicates that the dictionary has not been loaded. Your code is likely missing the call to load the dictionary - default or custom.

helioaymoto commented 11 months ago

Thanks Fiorix. I found the issue in my code... In fact, the dicionary has been loaded correctally, but I was not setting the application-id correctelly when bulding the CCR... Once I fix the application-id (4) it started to work as expected.

m := diam.NewRequest(diam.CreditControl, 4, c.Dictionary())

fiorix commented 11 months ago

Perfect!