4.1.17. MinUnitsHook Previous topic Parent topic Child topic Next topic

This hook will be called when the quota available for allocation for a subscriber reaches the minimum allocation as defined by the MinOctets or MinOctets configuration parameter. Quota available for allocation is defined as the remaining quota minus the sum of all outstanding allocations. The quota type (octets or time), remaining quota and sum of outstanding allocations are passed to the hook as parameters.
The default hook will log the event and set the Result-Code attribute to DIAMETER_- CREDIT_LIMIT_REACHED effectively terminating the session. You may change the hook to call send SMS, call an external process or do any other action.
The following arguments are passed to the hook in the following order:
  • Reference to this AuthBy
  • Reference to the current PCRFmsg
  • Quota type as string: 'time' or 'octets'
  • Remaining quota in bytes
  • Outstanding allocated quota in bytes