free-diameter

freediameter - No remaining suitable candidate to route the message


Well, I've started a simple project with freediameter library. what I need to achieve in my project is to create a client diameter application that could send some CCR request to a diameter server.

for this matter, I tried to create a new extension for freediameter daemon. So, the first thing I did was to setup the peer diameter server in config file:

ConnectPeer = "vm-pc.my.domain" { No_TLS; ConnectTo = "192.168.56.2"; Port=3868; };

and then initialize a request message in ta_entry function, in message body i specified the Destination-Host and Destination-Realm but still I receive this error:

01/10/17,01:55:24.980611 ERROR Routing error: 'No remaining suitable candidate to route the message to' for the following message: 01/10/17,01:55:24.980620 ERROR 'Credit-Control-Request' 01/10/17,01:55:24.980628 ERROR Version: 0x01 01/10/17,01:55:24.980635 ERROR Length: 20 01/10/17,01:55:24.980642 ERROR Flags: 0xC0 (RP--) 01/10/17,01:55:24.980649 ERROR Command Code: 272 01/10/17,01:55:24.980656 ERROR ApplicationId: 4 01/10/17,01:55:24.980664 ERROR Hop-by-Hop Identifier: 0x00000000 01/10/17,01:55:24.980671 ERROR End-to-End Identifier: 0xDCA05EF4 01/10/17,01:55:24.980678 ERROR {internal data}: src:(nil)(0) rwb:0x0 rt:0 cb:0x80523df30,0x0(0x803397da0) qry:0x0 asso:0 sess:0x0 01/10/17,01:55:24.981562 ERROR AVP: 'Session-Id'(263) l=8 f=-M val="hadi-pc.my.domain;1484000714;6" 01/10/17,01:55:24.981569 ERROR AVP: 'Origin-Host'(264) l=8 f=-M val="hadi-pc.my.domain" 01/10/17,01:55:24.981577 ERROR AVP: 'Origin-Realm'(296) l=8 f=-M val="my.domain" 01/10/17,01:55:24.981584 ERROR AVP: 'Destination-Host'(293) l=8 f=-M val="vm-pc.my.domain" 01/10/17,01:55:24.981591 ERROR AVP: 'Destination-Realm'(283) l=8 f=-M val="my.domain" 01/10/17,01:55:24.981599 ERROR AVP: 'Auth-Application-Id'(258) l=12 f=-M val=4 (0x4) 01/10/17,01:55:24.981606 ERROR AVP: 'CC-Request-Type'(416) l=12 f=-M val='EVENT_REQUEST' (4 (0x4)) 01/10/17,01:55:24.981613 ERROR AVP: 'CC-Request-Number'(415) l=12 f=-M val=2 (0x2)

Can anybody help me on this ? ps: as I see in the logs the CER/CEA are normal.


Solution

  • What Origin-Realm was signaled in the Capability-Exchange-Answer message when the connection was established?

    The Diameter request routing process (as described in https://www.rfc-editor.org/rfc/rfc6733#section-6.1) relies on the realm, so if the Origin-Realm returned by the peer is not "my.domain", freeDiameter will not route to this peer, even if the Origin-Host matches.