好吧,我已经开始了一个带有freediameter库的简单项目。 我需要在我的项目中实现的是创建一个客户端直径应用程序,它可以向直径服务器发送一些CCR请求。
为此,我尝试为freediameter守护进程创建一个新的扩展。 所以,我做的第一件事是在配置文件中设置对等直径服务器:
ConnectPeer = "vm-pc.my.domain" { No_TLS; ConnectTo = "192.168.56.2"; Port=3868; };
然后在ta_entry函数中初始化请求消息,在消息体中我指定了Destination-Host和Destination-Realm,但仍然收到此错误:
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)
有人可以帮我吗? ps:正如我在日志中看到的那样,CER / CEA是正常的。
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.
最满意答案
在建立连接时,在Capability-Exchange-Answer消息中发出了什么Origin-Realm信号?
Diameter请求路由过程(如https://tools.ietf.org/html/rfc6733#section-6.1中所述 )依赖于域,因此如果对等体返回的Origin-Realm不是“my.domain”,即使Origin-Host匹配,freeDiameter也不会路由到此对等体。
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://tools.ietf.org/html/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.
更多推荐
发布评论