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
]
get_user
Condition for Calling
To be able to check the answer from a challenge, the proxy must
determine which user account was used. In order to do this, the proxy call
the function get_user.
Most of the time, the user part of the URL in the From header will
identify the user. However, you might want to specify another policy or
add special cases (e.g. for gateways).
If the get_user function returns an empty string, the proxy will
look for the user parameter in the challenge response. In this case the
user agent may decide which account it uses to answer the question.
Default Implementation
The default implementation retrieves the user part of the URL in
the From header.
get_user() {
return parse_user($from);
}
on_new_user
Condition for Calling
When a new user is created via the web interface or through
explicit command in the scripting interface, the proxy calls a function
“on_new_user”. The function receives the user accounts as argument.
This function can be used nicely for welcome messages or other
actions that need to be done during the set up of a user account. example
include setting up of mailbox accounts, initializing billing parameters and
so on.
The function does not have any influence on the fact that the new
user account is being set up.
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 ...