54 • Scripting
[
S N O M
4 S P
R O X Y
/ R
E G I S T R A R
M
A N U A L
]
snom technology AG • 55
[
S N O M
4 S P
R O X Y
/ R
E G I S T R A R
M
A N U A L
]
Default Implementation
The default implementation first checks is the settings for
welcome messages are sufficient to generate a welcome message. It
is assumed that this is the case if a welcome file has been specified and
the method is either MESSAGE or an event type has been specified. An
event type is always necessary when the NOTIFY message type has been
selected.
Because the message type is set to “plain/text” by default,
the user just has specify a the file name to trigger sending welcome
messages.
If the default implementation determines that the message can
be sent, it creates a new message with the parameters set up by the web
interface and puts that message into the store and forward offer of the
respective account.
on_new_user($user) {
if ($welcome_file != “” &&
($welcome_event != “” || $welcome_method == “MESSAGE”) &&
$welcome_type != “”) {
store_message($user, create_message(create_url(), # From
create_url($user), # To
$welcome_method, # method
$welcome_event, # event
$welcome_type, # type
$welcome_file)); # file
}
}
user_directory
Condition for Calling
For a large number of registered users it is important to have a
hash function that puts the respective user into a bin. This way the proxy
can set up a layered file system structure where the hash results may
serve as first tier index for finding the user account.
For example, by using hash function returning thousand bins it
would be possible to set up approximately one million users without having
to bother about performance of the file system. If every registration
takes approximately 4 KB, registering 1 million users would require 40 GB
storage, which can be easily set up with an normal PC.
6.
Summary of Contents for 4S Media Server
Page 1: ...Administrator s Manual snom 4S SIP Proxy Registrar Version 2 30 ...
Page 14: ...14 VoIP Protocol S N O M 4 S P R O X Y R E G I S T R A R M A N U A L 1 ...
Page 84: ...84 Routing S N O M 4 S P R O X Y R E G I S T R A R M A N U A L 10 ...
Page 98: ...98 Maintenance S N O M 4 S P R O X Y R E G I S T R A R M A N U A L 13 ...