4S stands for “snom soft switch for small and medium enterprises“. We started the work on this proxy with the goal to give business a feature rich, robust and simple to use core component.
Page 4
This manual gives you a brief introduction to VoIP and SIP, explains the installation process for Windows and Linux and shows how to run the SIP proxy. For additional snom 4S information, please visit our Web site at http://snom.com and if you have any comments and suggestions about snom 4S, please contact us through snom technology AG’s support link Web site.
Update to 2.30 from Previous Versions ........21 Windows Installation ..............23 Uninstalling in Windows ............. 24 Linux Installation ..............24 Manual Starting ........................................................................ Automatic Starting Licensing ..............27 Accessing the web server ............27 Entering the license code ............28 snom technology AG • 5...
Page 6
4 S P S N O M R O X Y E G I S T R A R A N U A L Domains ..............29 Deriving settings ..............29 Creating a domain ..............30 Deleting a domain..............31 Edit a domain................31 Going to a domain context ............
Page 7
Max Forwards Call Log File ........................................ Tel Domain ..............................................................................ENUM Suffix NAT Gateway ......................................Do not signal loose routing .................................................... Do not Record-Route if Route is present Sequential Forking Time ................................Dial Plan.................. 77 snom technology AG • 7...
Page 8
What is DNS? ................87 Setup DNS................87 Server Farm Operation .............. 89 ENUM..................90 Registering Phones ..........91 snom 100 Registration............... 91 Microsoft Messenger Registration ..........92 Maintenance.............93 Registered Users ..............93 Call Logs ................. 94 Condition for Logging a Call ..............................
This manual does not cover all topics that are related to the usage of the proxy. We keep a list of frequently asked questions (FAQ) on our website at http://snom.com/faq_en.php for specialized topics such as remote management via shell script. They also contain topics that affect other SIP components like the media server or the phones.
A N U A L We also keep a list of bugfixes in the Release Notes which is available at the software download site at http://snom.com/down4s_ en.php. Before you make a software update, you make check this document if the update is necessary or not.
Why SIP? There has been a “protocol war” regarding the “best” way to set up a phone call. In the mid 90s, H.323 was the first attempt to unify the snom technology AG • 11...
4 S P S N O M R O X Y E G I S T R A R A N U A L VoIP industry under a common standard,and move the world of telephony into the computer industry, using most of the methods known from ISDN. Seen however from today’s perspective, the resulting technology was too complex, so products based on this technology did not work well together.
It is important that users know what to expect: Cell phone users know that driving through a tunnel may break the call, and Internet telephony users must be aware that talking for free over their DSL flatrate may compromise call quality. snom technology AG • 13...
Page 14
4 S P S N O M R O X Y E G I S T R A R A N U A L 14 • VoIP Protocol...
• they search internet addresses (DNS A, DNS SRV), • they usually include a web server, • they send an receive instant messaging information, • they publish network management information (SNMP), • they behave like normal computers on the network (DHCP, DNS). snom technology AG • 15...
The conference server also checks the credentials of participants joining the conference. The snom 4s is an example of this technology. Gateways From a SIP perspective, the gateway is also just a user agent.
SIP gateways. Examples of such gateways are manufactured by Cisco, Mediatrix, Sonus and Vegastream. The snom 4S gateway is a SIP NAT gateway software enabling Linux computers to be SIP-aware. B2BUA The back-to-back user agent (B2BUA) looks like a user agent, but is a network component like a proxy.
Version 2.30 introduces a domain concept which is not directly compatible to previous versions. The configuration information is stored in a central directory, along with all other configuration information. The previous versions used a more distributed approach. Figure 3-1: Installation Welcome Screen snom technology AG • 19...
Page 20
4 S P S N O M R O X Y E G I S T R A R A N U A L All configuration information is now stored in an XML-based for- mat in the file system. This approach makes it easier to maintain the soft- ware across the various platforms and allows you to use standard tools to maintain the configuration data e.g.
If you decline, the installation will be aborted. After accepting the license agreement, the next screen asks you to enter your personal information. Enter your name and the name of organization. Figure 3-3: Installation Customer Information snom technology AG • 21...
Page 22
4 S P S N O M R O X Y E G I S T R A R A N U A L You can then select the location where the proxy’s files will be put. The installation program proposes a reasonable location but if you want to you can change it.
Page 23
If you do not want to reboot your system (because it is running other critical applications), you can also manually start the service in the services section of the Windows control interface. Figure 3-6: Software Dialog in Windows snom technology AG • 23...
Check that the installation has been successful by checking the Services field of Windows. Open the services Window and look for “snom 4S SIP Proxy/Registrar”. The status should be “Started”. If this is not the case you should invoke the proxy by selecting “start”. In this case, we recommend rebooting the system to make sure that the proxy is running after the reboot.
The tarball includes a shell script with the name install.sh which sets up the neccessary files and links for you: ./install.sh The file /etc/rc.config (for SuSu Linux) and /etc/init.d/functions (for RedHat) are appended with the variable “START_SIP_PROXY” and the Figure 3-7: First Login snom technology AG • 25...
Page 26
4 S P S N O M R O X Y E G I S T R A R A N U A L SIP_PROXY_OPTS variable is set to a value depending on the html port that you specify. You can edit the file and modify the value. The installation script will install a command rcsip-proxy.
You need to have JavaScript enabled to use this feature. If your browser does not support JavaScript or you turned JavaScript off, you can use the link based navigation which is displayed snom technology AG • 27...
The “Hostnames” field has a function to uniquely identify this copy of the snom SIP proxy. Therefore, when requesting the license key from snom you should use the DNS names of the host which will run the proxy. But examples are “proxy.mycompany.com 213.43.34.12”...
When you set up a domain, most of the domain settings are copied from the global settings context. Most of the menus which are available for domains are also available under a global scope. Although snom technology AG • 29...
4 S P S N O M R O X Y E G I S T R A R A N U A L they don‘t have any effect on the global behavior of the proxy, they serve as a template when a domain is created. Once a domain has been created, changes in the global settings context to not affect the settings of the domain anymore.
You will see the primary domain name in brackets. If you want to enforce that the proxy goals to specific domain you can also include a domain parameter in the URL. The proxy does include that parameter automatically in the domain selection list. snom technology AG • 31...
4 S P S N O M R O X Y E G I S T R A R A N U A L Backup Domain its are stored in XML-files in the file system. That means you can copy and edit them with a plain text editor. You can also put them under revision control (for example with CVS) and make sure that nobody overwrites them with some unproven settings.
If you are not interested in scripting, you can skip this chapter. Background Using the script language of the snom 4S proxy, you can customize the behaviour beyond the settings which are available on the web interface.
4 S P S N O M R O X Y E G I S T R A R A N U A L The layered architecture is also used for defining variables. Global variables can be overwritten by domain specific variables in the same way that functions are overwritten.
(no if-else part). If there is a match, it executes the body for that if-else part. If no match was found and a else part is present, it executes the body of the else part. snom technology AG • 35...
4 S P S N O M R O X Y E G I S T R A R A N U A L The comparisons for conditions is done case-insensitive, so that “TRUE” also leads to execution of a body. Note: In contrast to C, the body must be enclosed in brackets (“{“...
(if there is such a context) or the context of the domain (if there is no request). Types The proxy scripting language does not support the concept of type. All variables are simply treated as strings. In the case that an snom technology AG • 37...
4 S P S N O M R O X Y E G I S T R A R A N U A L operator expects a number, it first determines the value of that string, performs the operation and then converts the result back into a string. This is also the case for Boolean operators as seen in the “if”...
Func ( arg1, arg2, arg3 ) { body } The name of the function must be followed by brackets enclosing a list of arguments (separated by comma). If the list is empty it still needs snom technology AG • 39...
4 S P S N O M R O X Y E G I S T R A R A N U A L the brackets. The arguments must be variable names including the dollar sign and it is not allowed to use expressions in the argument list. By providing arguments that are not initialized when the function is being called, you can set up local variables for the function.
Page 41
“[a-z]” matches a character range. See the description for the dial plan for details. ere_match ere_match is also used for pattern matching. In contrast to match, it uses the “extended regular expression” matching used in NAPTR DNS snom technology AG • 41...
4 S P S N O M R O X Y E G I S T R A R A N U A L resolution. However, it can also be helpful in other cases when pattern need to be replaced (that was the reason why is was chosen in NAPTR). For more information, refer to RFC 2915.
Page 43
This function extracts the contact header arguments of a string. The header arguments are behind the “?” and separated by “&” characters (see http URL). The result is also a list of space separated elements. Example: parse_header (“sip:ff@bla.com?p1=1&p2=2”) returns “p1=1 p2=2”. snom technology AG • 43...
4 S P S N O M R O X Y E G I S T R A R A N U A L SIP functions create_url create_url is a helper function that creates a URL from its arguments. It takes four arguments. The first argument it the user name.
NAT. register The function register takes as parameter an account name. It registers the contacts provided in the current request with the current account and sends a success response back to the user agent client. snom technology AG • 45...
4 S P S N O M R O X Y E G I S T R A R A N U A L See the explanations on registrations on details on Path and registration duration limitation. Proxy Related Functions proxy_dest This is one of the core functions of the proxy.
Page 47
URI of the request. The fourth argument is the dial plan in the format generated by the web interface. Normally, proxy calls function like this: exec_ dialplan(parse_url($from), parse_url($to), $request_uri, $allow_ pattern). snom technology AG • 47...
4 S P S N O M R O X Y E G I S T R A R A N U A L Other Functions create_message The create_message function generates a request string that can be stored in the store-and-forward buffer of a user account. This function is helpful for generating welcomes messages and other information messages.
$method is set to the method of the request (e.g. INVITE, NOTIFY, etc.), $request_uri is set to the request URI of the request (this is the word after the method), $from is set to the value of the From header, snom technology AG • 49...
Page 50
4 S P S N O M R O X Y E G I S T R A R A N U A L including display-name and tags, $to is set to the value of the To header, similar to the $from variable. After the variables have been copied, the proxy calls the on_ request function without any arguments.
4 S P S N O M R O X Y E G I S T R A R A N U A L on_register Condition for Calling When the proxy receives a REGISTER request, it would normally call on_request as the REGISTER is also a request. However, because normally REGISTER requests must be treated differently that other requests, the proxy calls the more special function on_request.
Page 53
URI. challenge() { if ($method == “REGISTER”) { if ($force_authorization || known(parse_user($from))) { return true; else { foreach($i, $auth_exception) { if (match($i, $request_uri)) return true; return false; #default snom technology AG • 53...
4 S P S N O M R O X Y E G I S T R A R 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.
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. snom technology AG • 55...
4 S P S N O M R O X Y E G I S T R A R A N U A L 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.
4 S P S N O M R O X Y E G I S T R A R A N U A L on_unroutable Condition for Calling When a SIP URL cannot be resolved via DNS, the proxy calls this callback.
There are a number of general settings that you should set up in the beginning. To do this, go to the Administration/Settings menu item. SIP Port The SIP port defines where the proxy expects SIP traffic. Typically, this will be port 5060. snom technology AG • 59...
TCP threshold SIP uses both reliable and non-reliable transport layers. The snom proxy version 2.30 supports UDP and TCP transport layers. When the proxy needs to send a request, it has to make a decision which transport layer to use. The TCP threshold value is compared against the packet length.
Just click on the link at the bottom of the web page to see the general configuration of the proxy. You can save this configuration in any file you like. To upload the configuration from such a file, use the file selection snom technology AG • 61...
Page 62
4 S P S N O M R O X Y E G I S T R A R A N U A L box at the bottom of the web page. This way you can also easily distribute configuration files over several redundant proxies. 62 •...
The user name is usually identical to the account name; however you may specify a different name if you want to make authentication even more secure. The password is not transmitted directly snom technology AG • 63...
4 S P S N O M R O X Y E G I S T R A R A N U A L in SIP and therefore provides a good mechanism to make sure that the user is the one that he or she pretends to be. However, if you choose a four of five digit PIN code it is relatively easy to guess that PIN code by an observer by trying out all possible combinations.
In contrast to the domain files, the proxy does not cash account files. They all loaded on demand and if it change occurs written back to the file system. Therefore, it is not recommended to modify a these files. snom technology AG • 65...
Page 66
S N O M R O X Y E G I S T R A R A N U A L Figure 7-1: snom 100 Registration Messages Sent to udp:192.168.0.1:5060 at Wed, 31 Dec 1969 21:25:22:458 GMT: REGISTER sip:snomag.de SIP/2.0 Via: SIP/2.0/UDP 192.168.0.11:5060;branch=z9hG4bK-9jodhbwsu13y Max-Forwards: 70 From: “Theo Test”...
This means that unknown users can not register on the proxy. If the flag is set to “off”, only known users are challenged, that means the proxy is open for registration. The list of users is discussed below. snom technology AG • 67...
4 S P S N O M R O X Y E G I S T R A R A N U A L Min and Max registration time User agents register for a specific amount of time. If a user agent does not refresh a registration before this time, the registration is silently discarded.
Example Registrations Snom 200 If you turn authorization off on the proxy registering a snom 200 voice over IP phone is simple. Just open the web browser and go to the SIP lines web page. Fill in your user account and domain name and click on the save button.
4 S P S N O M R O X Y E G I S T R A R A N U A L expiration date you should see all registration related packets that went through the proxy. Microsoft Messenger If you are using Windows XP or Windows 2000, using Microsoft Messenger is a good way of making voice over IP phone calls without any further investments.
If you set up a user name and password on the proxy, Microsoft messenger will prompt you for this user name password combination. Fill it in and try again. Figure 9-2: Selecting Server and Transport snom technology AG • 71...
Page 72
E G I S T R A R A N U A L Then you can check the registration on the proxy in the same way that you check the registration with the snom 200 voice over IP phone. 72 • Registration...
Routing Routing is one of the most important task of the proxy. As you already could see in the scripting part of this manual, the snom 4S SIP proxy supports numerous ways to support even complex routing scenarios. This chapter focuses on the web interface to the routing. This interface controls variables which are interpreted by the default script.
4 S P S N O M R O X Y E G I S T R A R A N U A L Max Forwards Messages in SIP may hop over a number of proxies, and sometimes the path contains loops. Sometimes the loops are endless, and in these situations the criterion for rejecting a message is to look at the number of hops the request has done so far.
“loose routing”, a new and better way of routing messages was developed. For more information see the SIP standard RFC3261 or the literature available on this topic. The snom 4S supports both routing methods. Although loose routing is mandatory for new SIP equipment and is compatible with the old routing method (“strict routing”), some...
4 S P S N O M R O X Y E G I S T R A R A N U A L Sequential Forking Time When you allow the proxy to register an account more than once, the proxy starts “sequential forking” if the registration show different probabilities.
Looking at the destination you can find out if the call is local, international, going to the boss, and so on. The matching process is done using the following “wildcards”: snom technology AG • 77...
Page 78
4 S P S N O M R O X Y E G I S T R A R A N U A L • ‘?’ matches any character as long as there is one. • ‘$’ matches a E164 number (0-9, #, * and also + and -). •...
URL. This can be left out when all attached SIP devices use the latest SIP draft for generating URLs. The destination will be the dialled number plus the string “@gw”, which would be the gateway in this installation. snom technology AG • 79...
4 S P S N O M R O X Y E G I S T R A R A N U A L Rules 2 through 4 match destinations with 1 to 3 digits. They are marked as “incomplete”, giving the user the chance to enter more digits. Example 2: North American Dial Plan This example is suitable for a proxy located in the USA.
For international numbers, the proxy requires the user to start with 0011 and terminate the entry with the hash symbol. This example does not cover sip urls for simplicity. Mode User/Group Pattern Destination Incomplete tel:%@~* Gateway tel:911@~* tel:+1-972-911 Gateway tel:$$$$$$$$$$@~* tel:+1{user}@gw Gateway tel:0011%#@~* tel:+{user:4:-1}@gw snom technology AG • 81...
4 S P S N O M R O X Y E G I S T R A R A N U A L Error-Information Error-Informationen is not directly part of the routing. This feature merely provides the user agent client with additional information if a request fails.
Page 83
E G I S T R A R A N U A L For the available error messages, please refer to RFC3261 and the extensions that apply. The proxy includes a list of the most frequenly used error messages. snom technology AG • 83...
Page 84
4 S P S N O M R O X Y E G I S T R A R A N U A L 84 • Routing...
This is a nice feature that informs users about the operators capabilities or downloads operator images onto the phones. When the location of the attachment file changes, the proxy notifies all registered users about the change. snom technology AG • 85...
Page 86
4 S P S N O M R O X Y E G I S T R A R A N U A L The proxy allows two method for notifying users, message and notify. Notify is typically used for sending media attachments, message is the instant message notification style (which is compatible with most popular equipment).
What is DNS? The domain name system (DNS) is a powerful mechanism to make internet addresses human-readable. “snom.com” is much easier to remember than 192.67.198.4. But there are also other reasons to use DNS: If the underlying address changes, the user does not have to change all the addresses in his or her address book.
Page 88
“_sip._udp” and “_sip._tcp” for your domain and assign weights and probabilities to the different hosts that serve these services. A configuration file for Linux might look like this: $TTL 1D anycom.de. IN SOA fox.anycom.de. hostmaster.snom.de. ( 2002050111 ; serial ; refresh ; retry ; expiry 1D ) ;...
It has to be noted here that the exchange of the necessary information between the proxies runs with a propretary extension of the SIP protocol. Because of this, the redundancy setup of the snom 4S SIP proxy will not work with proxies from other vendors. However, as the whole system can be viewed as a proxy, that should not be reason for concern.
4 S P S N O M R O X Y E G I S T R A R A N U A L To set up redundancy, you need to enter the address of the other proxies. Typically this will be IP addresses, however it can also be DNS addresses.
The path is optional. • User-Agent: The user agent identification tells the proxy if a license is required. • Probability: The probability of the registration. Users are searched according to their probability. snom technology AG • 91...
4 S P S N O M R O X Y E G I S T R A R A N U A L • Expires: The expiry time in seconds. If you click on the link behind this number, you get to the SIP message trace that is associated with the registration.
The call log stores only the last 100 calls and discards older calls. The call log is only reliable in so far as the involved network elements follow the loose routing of the proxy. If network elements violate this rule, snom technology AG • 93...
URL. This makes the log easier to read. The proxy supports also RADIUS and a snom-proprietary XML format to record calls. Please see the FAQ on this topic for more information.
Here you can see which transport layer (UDP or TCP) was used, the IP address of the source or destination, and the port that was involved. • Header: Here you can see the first line of the SIP message. snom technology AG • 95...
Page 96
4 S P S N O M R O X Y E G I S T R A R A N U A L By clicking on the header line, you get the whole packet: 96 • Maintenance...
However, the packets are kept in the call flow analysis log and on the registration page. Logging If you want to see the log file, just go to the Log file menu item. To clear the log, go to the bottom and click on “Clear”. snom technology AG • 97...
Page 98
4 S P S N O M R O X Y E G I S T R A R A N U A L 98 • Maintenance...
Need help?
Do you have a question about the 4S and is the answer not in the manual?
Questions and answers