Skip to content

Commit

Permalink
Update the documentation to show how to send AVPs with a VendorId.
Browse files Browse the repository at this point in the history
  • Loading branch information
lwlee2608 committed Jan 10, 2024
1 parent 07abfc8 commit 6362441
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ export default function () {
avp.New(code.SubscriptionIdData, 0, flag.M, data.UTF8String("subs-data")),
avp.New(code.SubscriptionIdType, 0, flag.M, data.Enumerated(1))
])))
ccr.add(avp.New(code.ServiceInformation, 10415, flag.M, data.Grouped([
avp.New(code.PSInformation, 10415, flag.M, data.Grouped([
avp.New(code.CalledStationId, 0, flag.M, data.UTF8String("10099"))
]))
])))

const cca = client.send(ccr)
console.log(`CCA: ${cca}`)
Expand Down
3 changes: 3 additions & 0 deletions example/diam/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const flag = {
P: 0x20, // private bit
}
export const code = {
CalledStationId: 30,
DestinationHost: 293,
DestinationRealm: 283,
OriginHost: 264,
Expand All @@ -26,6 +27,8 @@ export const code = {
SubscriptionId: 443,
SubscriptionIdData: 444,
SubscriptionIdType: 450,
ServiceInformation: 873,
PSInformation: 874,
// Extra
EventNameCode: 13001,
}
Expand Down
5 changes: 5 additions & 0 deletions example/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ export default function () {
avp.New(code.SubscriptionIdData, 0, flag.M, data.UTF8String("subs-data")),
avp.New(code.SubscriptionIdType, 0, flag.M, data.Enumerated(1))
])))
ccr.add(avp.New(code.ServiceInformation, 10415, flag.M, data.Grouped([
avp.New(code.PSInformation, 10415, flag.M, data.Grouped([
avp.New(code.CalledStationId, 0, flag.M, data.UTF8String("10099"))
]))
])))

const cca = client.send(ccr)
console.log(`CCA: ${cca}`)
Expand Down

0 comments on commit 6362441

Please sign in to comment.