mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Diameter fixes to cope with application type=auth, diameter tests back on track
This commit is contained in:
@@ -191,7 +191,7 @@ func TestDmtAgentTPFromFolder(t *testing.T) {
|
||||
time.Sleep(time.Duration(1000) * time.Millisecond) // Give time for scheduler to execute topups
|
||||
}
|
||||
|
||||
func TestConnectDiameterClient(t *testing.T) {
|
||||
func TestDmtAgentConnectDiameterClient(t *testing.T) {
|
||||
dmtClient, err = NewDiameterClient(daCfg.DiameterAgentCfg().Listen, "UNIT_TEST", daCfg.DiameterAgentCfg().OriginRealm,
|
||||
daCfg.DiameterAgentCfg().VendorId, daCfg.DiameterAgentCfg().ProductName, utils.DIAMETER_FIRMWARE_REVISION, daCfg.DiameterAgentCfg().DictionariesDir)
|
||||
if err != nil {
|
||||
|
||||
@@ -49,8 +49,9 @@ func NewDiameterClient(addr, originHost, originRealm string, vendorId int, produ
|
||||
RetransmitInterval: time.Second,
|
||||
EnableWatchdog: true,
|
||||
WatchdogInterval: 5 * time.Second,
|
||||
AcctApplicationID: []*diam.AVP{
|
||||
diam.NewAVP(avp.AcctApplicationID, avp.Mbit, 0, datatype.Unsigned32(4)), // RFC 4006
|
||||
AuthApplicationID: []*diam.AVP{
|
||||
// Advertise support for credit control application
|
||||
diam.NewAVP(avp.AuthApplicationID, avp.Mbit, 0, datatype.Unsigned32(4)), // RFC 4006
|
||||
},
|
||||
}
|
||||
if len(dictsDir) != 0 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diameter>
|
||||
<application id="4" type="acct">
|
||||
<application id="4" type="auth">
|
||||
<vendor id="10415" name="3GPP" />
|
||||
<avp name="3GPP-Charging-Characteristics" code="13" must="V" may="P" must-not="M" may-encrypt="Y" vendor-id="10415">
|
||||
<data type="UTF8String" />
|
||||
@@ -1373,15 +1373,6 @@
|
||||
<data type="Enumerated">
|
||||
<item code="0" name="WLAN" />
|
||||
<item code="1" name="VIRTUAL" />
|
||||
<item code="1000" name="UTRAN" />
|
||||
<item code="1001" name="GERAN" />
|
||||
<item code="1002" name="GAN" />
|
||||
<item code="1003" name="HSPA_EVOLUTION" />
|
||||
<item code="1004" name="EUTRAN" />
|
||||
<item code="2000" name="CDMA2000_1X" />
|
||||
<item code="2001" name="HRPD" />
|
||||
<item code="2002" name="UMB" />
|
||||
<item code="2003" name="EHRPD" />
|
||||
</data>
|
||||
</avp>
|
||||
<avp name="Read-Reply-Report-Requested" code="1222" must="V,M" may="P" must-not="-" may-encrypt="N" vendor-id="10415">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diameter>
|
||||
<application id="4" type="acct">
|
||||
<application id="4" type="auth">
|
||||
<!-- Diameter Credit Control Application -->
|
||||
<!-- http://tools.ietf.org/html/rfc4006 -->
|
||||
<command code="272" short="CC" name="Credit-Control">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diameter>
|
||||
<application id="4" type="acct">
|
||||
<application id="4" type="auth">
|
||||
<vendor id="2011" name="Huawei" />
|
||||
<avp name="IN-Information" code="20300" must="V" may="P,M" must-not="-" may-encrypt="N" vendor-id="2011">
|
||||
<data type="Grouped">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diameter>
|
||||
<application id="4" type="acct">
|
||||
<application id="4" type="auth">
|
||||
<!-- Diameter Network Access Server Application -->
|
||||
<!-- http://tools.ietf.org/html/rfc7155 -->
|
||||
<command code="265" short="AA" name="AA">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diameter>
|
||||
<application id="4" type="acct">
|
||||
<application id="4" type="auth">
|
||||
<vendor id="94" name="Nokia" />
|
||||
<avp name="Session-Start-Indicator" code="5105" must="V" may="P,M" must-not="-" may-encrypt="N" vendor-id="94">
|
||||
<data type="UTF8String" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<diameter>
|
||||
<application id="4" type="acct">
|
||||
<application id="4" type="auth">
|
||||
<vendor id="12645" name="Vodafone" />
|
||||
<avp name="Reporting-Reason" code="261" must="V" may="P,M" must-not="-" may-encrypt="N" vendor-id="12645">
|
||||
<data type="Enumerated">
|
||||
|
||||
Reference in New Issue
Block a user