Require_Billing - Snom 4S Administrator's Manual

Sip proxy/registrar version 2.30
Table of Contents

Advertisement

[
S N O M
For instance, if the hash function would return the first digit of a
telephone number, the proxy with set up ten subdirectories each of them
containing the telephone numbers starting with the first digit. That would
increase the performance of the proxy almost by a factor ten already.
However, practically it is usually not so easy to find such a simple
hash function. In cases where most of the users start for example with
the number 2, that hash function would not be effective at all. Therefore,
the proxy allows to define a customized hash function.
Good hash functions could be taking the last digit or the last
two digits of the user accounts if they are equally distributed.
sophisticated-functions like a MD5 or check sum can be used in cases
where an equally distributed hash function cannot be found easily.
Default Implementation
The default implementation returns the first character of the user
name. This gives the proxy at least a minimum level of hierachy.
user_directory($user) {
return leftstr($user, 1);
}

require_billing

Condition for Calling
Before the proxy starts billing a request with RADIUS, it calls a
the require_billing function. This is necessary because RADIUS assumes
that before a call can start the RADIUS server from its access. If the
function returns the value "true" and the radius parameters have been set
up, the proxy will first initiate a RADIUS admission request before it starts
forking requests by calling the on_request function.
If RADIUS admission request is being denied, the proxy will call a
function on_denial. This function then can inform the user that the trend
is not sufficient by returning an appropriate response.
Practically, not all requests require billing. Depending on the policy
of the operator, instant messages might be delivered without any billing,
while initial INVITE requests may only be forwarded if the respective user
account has positive credit. It also depends on the policy of the operator
if for instance presence messages are subject to billing. It is very hard to
56 • Scripting
4 S P
/ R
R O X Y
E G I S T R A R
M
]
A N U A L
More

Advertisement

Table of Contents
loading

Table of Contents