Snom 4S Administrator's Manual
Snom 4S Administrator's Manual

Snom 4S Administrator's Manual

Sip proxy/registrar version 2.30
Table of Contents

Advertisement

Quick Links

Administrator's
Manual
snom 4S
SIP Proxy/Registrar
Version 2.30

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 4S and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Snom 4S

  • Page 1 Administrator‘s Manual snom 4S SIP Proxy/Registrar Version 2.30...
  • Page 2 © 2003 snom technology Aktiengesellschaft. All Rights Reserved. This document is supplied by snom technology AG for information purposes only to licensed users of the snom 4S registrar proxy and is supplied on an “AS IS” basis, that is, without any warranties whatsoever, express or implied.
  • Page 3: Welcome To The Sip World

    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.
  • Page 5: Table Of Contents

    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 ..............................
  • Page 9: Read This First

    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.
  • Page 10: Scripting

    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.
  • Page 11: The Voice Over Internet Protocol

    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...
  • Page 12: Open Standards

    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.
  • Page 13: What You Can Expect And What Not

    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...
  • Page 15: The Sip Architecture

    • 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...
  • Page 16: Proxies

    (UAC). The snom 4S proxy is a stateful proxy with some B2BUA extensions.
  • Page 17: Registrars

    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.
  • Page 18: B2Bua

    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.
  • Page 19: Installation

    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.
  • Page 21: Windows Installation

    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...
  • Page 24: Uninstalling In Windows

    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.
  • Page 25: Automatic Starting

    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.
  • Page 27: Licensing

    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...
  • Page 28: Entering The License Code

    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”...
  • Page 29: Domains

    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...
  • Page 30: Creating A Domain

    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.
  • Page 31: Deleting A Domain

    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...
  • Page 32: Backup

    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.
  • Page 33: Scripting

    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.
  • Page 34: Script Structure

    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.
  • Page 35: Case

    (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...
  • Page 36: Foreach

    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 (“{“...
  • Page 37: Return

    (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...
  • Page 38: Operators

    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”...
  • Page 39: Functions

    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...
  • Page 40: Calling

    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...
  • Page 42: Parsing Functions

    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...
  • Page 44: Sip Functions

    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.
  • Page 45: Registration Related Functions

    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...
  • Page 46: Proxy Related Functions

    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...
  • Page 48: Other Functions

    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.
  • Page 49: Callbacks

    $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.
  • Page 51: On_Response

    { # handle redirect codes if ($code >= 300 && $code < 400) { send_ringing(“181 Call Being Forwarded”); foreach($dest, get_contacts()) { proxy_dest($dest); return false; else { return true; # this is a valid response snom technology AG • 51...
  • Page 52: On_Register

    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...
  • Page 54: Get_User

    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.
  • Page 55: User_Directory

    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...
  • Page 56: Require_Billing

    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.
  • Page 57: On_Denial

    Default Implementation The default implementation merely returns in an error code “403 Forbidden“. on_denial() { reject_request(“403 Forbidden”); snom technology AG • 57...
  • Page 58: On_Unroutable

    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.
  • Page 59: General Setup

    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...
  • Page 60: Stun Port

    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.
  • Page 61: Http Port

    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 •...
  • Page 63: User Accounts

    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...
  • Page 64: Setting Up Accounts From 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 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.
  • Page 65: Storing Information

    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”...
  • Page 67: Registration

    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...
  • Page 68: Min And Max Registration Time

    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.
  • Page 69: Example Registrations

    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.
  • Page 70: Snom 200

    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.
  • Page 71: Microsoft Messenger

    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...
  • Page 73: Routing

    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.
  • Page 74: Max Forwards

    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.
  • Page 75: Do Not Signal Loose Routing

    “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...
  • Page 76: Sequential Forking Time

    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.
  • Page 77: Dial Plan

    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 -). •...
  • Page 79: Example 1: Setting Up Overlap Dialling

    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...
  • Page 80: Example 2: North American Dial Plan

    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.
  • Page 81: Example 4: Using Enum

    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...
  • Page 82: Error-Information

    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...
  • Page 85: Message Handling

    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).
  • Page 87: Dns

    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 ) ;...
  • Page 89: Server Farm Operation

    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.
  • Page 90: Enum

    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.
  • Page 91: Registering Phones

    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...
  • Page 92: Microsoft Messenger Registration

    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.
  • Page 93: Call Logs In The Web Interface

    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...
  • Page 94: Pending Calls

    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.
  • Page 95: Sip Message Flow

    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...
  • Page 97: Logging

    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...
  • Page 99: Index

    Installation 19 Delete 60 Installation Directory 20 DHCP 11 Instant Messaging 11 Dial Plan 45 Interoperability 3, 8, 16 Dial plan 15 IPchains 16 DiffSrv 7 ISDN 7 DNS 11, 52 DNS SRV 28 DSL 16 snom technology AG • 99...
  • Page 100 Path registration 15, 16 SIP Message Flow 63 Ports 21 SIP NAT Gateway 16 PPPoE 16 SNMP 11 Private IP Address 31 snom 100 Registration 55 Private Networks 16 Soft Switch 3 Probability 9, 30, 59 State 29 Proxies 12 Stateful Forking 15...
  • Page 101 Supplementary Services 8 Switched Network 7 TCP threshold 39 Transfer 9 Transport Layer 16, 29 UAC 32 UAS 32 Uninstalling 23 User 59 User-Agent 11, 59 VLAN 7 VoIP 7 Web Access 16 Wildcards 46 snom technology AG • 101...
  • Page 102 USA Representation Pascalstr. 10E, 10587 Berlin, Germany ABP International, Inc. Phone: +49 (30) 39833-0 Crestside Dr. mailto: info@snom.de Coppell, Texas 75019, USA http: www.snom.com Phone: +1-972-831-0280 sip: info@snom.com sip: usa@snom.com mailto: usa@snom.de © 2003 snom technology AG All rights reserved.

Table of Contents