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

Snom 4S Administrator's Manual

Calling card system version 1.00
Hide thumbs Also See for 4S:

Advertisement

Administrator's
Manual
4
S
snom 4S Calling Card Application Chain
snom 4S
Registrar/Proxy
4
S
SIP User Agents
snom 105
snom 200
Softphone
snom 4S
Calling Card System
Version 1.00
© 2004 snom technology AG
snom 4S
SIP/PSTN
Media Server
Gateway
4
S
Application Server
��
Breakout
PSTN Network

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

Summary of Contents for Snom 4S

  • Page 1 Administrator‘s Manual snom 4S Calling Card Application Chain © 2004 snom technology AG snom 4S snom 4S SIP/PSTN Registrar/Proxy Media Server Gateway Breakout PSTN Network SIP User Agents snom 105 snom 200 Application Server Softphone �� snom 4S Calling Card System...
  • Page 2 © 2004 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 Calling Card´s Module and is supplied on an “AS IS” basis, that is, without any warranties whatsoever, express or implied.
  • Page 3: Table Of Contents

    The Application Logic 4. Installation............13 4.1. Installing the SNOM 4SProxyRegistrar ........13 ....................................The Proxy Script 4.2. Installing the SNOM 4S Mediaserver ........18 Creating the Calling Card Account ..........................4.3. Installing the Application Server ........... 19 Installing the Web server ...............................
  • Page 4 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L 6.2. Setting rates..............34 6.3.
  • Page 5: Overview

    Registrar (S4SPR). The S4SPR handles primary authentication and keeps track of all active users. At the core of the calling card system lies the SNOM 4S Mediaserver (S4SMS). The S4SMS is a versatile media server, which provides media encoding/decoding as well as sophisticated back-to-back user agent (B2BUA) functionality.
  • Page 6 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L 6 • Overview...
  • Page 7: Usage Scenario

    SUA) and the SUA re-sends the REGISTER request with the required authentication information. If the authentication information matches the database of valid and active calling cards, the registrar sends back a SIP/2.0 200 OK snom technology AG • 7...
  • Page 8 Accounting starts after the media connection between SUA and PSTN counterpart has been established. The SNOM 4S Mediaserver at the core of the system goes through a state transition after each billing period. Based on this transition, the accounting database is updated and real-time balance information is sent to the SUA .
  • Page 9: Components

    3. Components The main components have already been described. The following image shows their interaction. snom technology AG • 9...
  • Page 10: Snom 4S Proxy/Registrar

    D M I N I S T R A T O R A N U A L 3.1. SNOM 4S Proxy/Registrar The S4SPR acts as the authentication and authorization gateway to the system. Its user information needs to be synchronized with the user database in the application server.
  • Page 11: The Web Server

    We are currently using Apache 2.0.48 with SSL support. No other special features are needed. The Database Server We are currently using MySQL 4.0.16. No special features are needed. The database itself is quite simple, with an ERD given below: snom technology AG • 11...
  • Page 12: The Application Logic

    4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L The Application Logic Most of the application logic is written PHP 4.
  • Page 13: Installation

    Once installed, you will need to set up the SIP domain for the CC system and configure your DNS accordingly. We will assume the domain name cccall.com. Please also verify that the Proxy script needed for the “X-SNOM- CCTOKEN” extension is included. The Proxy Script The following proxy script needs to be set: snom technology AG •...
  • Page 14 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L user_directory($user) return rightstr($user,3); on_register($user, $nat, $t) { if ( $nat == “”...
  • Page 15 { proxy_normal_user($user); } # method == INVITE else if ($method == “MESSAGE” && !registered($user)) { # store & forward: store_message($user); reject_request(“200 Message Delivered”); # default else { # default action if (registered($user)) { proxy_user($user, $seqfork_delay); snom technology AG • 15...
  • Page 16 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L else { reject_request(“404 Not Registered”);...
  • Page 17 Preferences”->”Script” page of your SIP domains administration page on the S4SPR. If the script is not set, you can copy the script included above and paste it into the text window. Then press “Save” and the script should be loaded. snom technology AG • 17...
  • Page 18: Installing The Snom 4S Mediaserver

    4.2. Installing the SNOM 4S Mediaserver Creating the Calling Card Account Make sure you have a Callingcard license. You can verify this by looking at your license string, which should start with the string “snom- media-cc1”. Install the SNOM 4S Mediaserver as per its documentation.
  • Page 19: Installing The Application Server

    4.3. Installing the Application Server The Application Server consists of • A Web server: • A Database server: MySQL 4.0.16 • The Calling Card database • Application logic in the form of PHP4 and Perl5 scripts snom technology AG • 19...
  • Page 20: Installing The Web Server

    However, any Web server capable of serving PHP4 scripts will be suitable. Apache configured through configuration file called httpd.conf. The following excerpt shows the only settings specific to the S4SCC: LoadModule php4_module modules/libphp4.so Alias /cc/ “/ourPHPDirectory/” User snom 20 • Installation...
  • Page 21: Installing The Database Server And The Calling Card Database

    The directory, which contains the PHP scripts (cc_init.php etc.). That Apache should run under the User ID snom. Any user other than Nobody will do. The reason for the second setting is that some scripts need to send out Emails and on many UNIX systems, user Nobody is barred from doing so.
  • Page 22 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L The SQL code to create the database tables is: # Host: localhost # Time: 20.
  • Page 23 `alias` varchar(255) default NULL, `creation_time` varchar(14) default NULL, `PIN` varchar(4) NOT NULL default ‘’, `batch` int(11) NOT NULL default ‘0’, PRIMARY KEY (`id`), KEY `rate` (`rate`) ) TYPE=MyISAM; # -------------------------------------------------------- # table structure for table `duration` snom technology AG • 23...
  • Page 24 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L DROP TABLE IF EXISTS `duration`; CREATE TABLE `duration` ( `ID` int(10) unsigned NOT NULL auto_increment, `Name` varchar(12) NOT NULL default ‘’,...
  • Page 25: Installing The Scripts

    $this->db_pass = “cccall”; $this->db_name = “callingcard”; $this->gateway[“natl”] = “192.168.0.1”; $this->gateway[“intl”] = “192.168.0.1”; $this->perl = “/usr/bin/perl”; $this->perldir = “/home/cccall/ccperl”; The two entries for $this->gateway point to the: • SIP/PSTN gateway international calls (numbers beginning with “00”) at $this->gateway[“intl”] snom technology AG • 25...
  • Page 26 $proxyhosts is an array specifying the IP address(es) of your SNOM 4S proxy/registrars. As Redundancy is not covered in this manual, we will limit ourselves to the discussion of a single proxy installation. 26 • Installation...
  • Page 27: Configuration

    Argument: in the case of Forwarding, this is the SIP URI to which the call is forwarded. In our case this corresponds to the SIP URI of the Calling Card B2BUA on the Mediaserver. snom technology AG • 27...
  • Page 28 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L Example (assuming your SIP domain is cccall.com and the Mediaserver’s domain is ms.cccall.com): Mode: Forward...
  • Page 29: Configuring The Interface Between Snom 4S Mediaserver And Application Server

    D M I N I S T R A T O R A N U A L 5.2. Configuring the interface between SNOM 4S Mediaserver and Application Server Two components define the interaction of the Mediaserver and the Application Server:...
  • Page 30: The Xml State Script

    The XML state script For a general description of the XML-based scripting language, please refer to the SNOM 4S Media Server XML Scripting guide. We include an excerpt of a reference script to show how the XML script is used to execute state-dependent HTTP GET requests.
  • Page 31 $session</cmd> <cmd>web_get $webserver/cc_rate.php?PHPSESSID=$session</ cmd> <cmd>message “snom Calling Card System”</cmd> <cmd>goto wait_for_rate</cmd> </event> </state> <state name=” ”> wait_for_session <event name=” ”> <cmd>set session $session</cmd> <cmd>web_get $webserver/cc_rate.php?PHPSESSID=$session</ cmd> <cmd>message “snom Calling Card System”</cmd> <cmd>goto wait_for_rate</cmd> </event> </state> snom technology AG • 31...
  • Page 32 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L 32 • Confi guration...
  • Page 33: Administering The Calling Card System

    “0” will have a credit of “10” and a card of limit type “1” will have a credit of “20”. In future versions of the S4SCC this will be freely configurable through a web interface. snom technology AG • 33...
  • Page 34: Setting Rates

    4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L 6.2. Setting rates You need to provide rate information in CSV-Format.
  • Page 35: Footnotes

    A N U A L Footnotes Currently German, English, Japanese and Chinese (Mandarin) The token is passed in a special header („X-SNOM-CCTOKEN“) in the „200 OK“ response to the REGISTRATION request. As an SIP MESSAGE A special license is needed to enable this feature.
  • Page 36 4 S C S N O M A L L I N G A R D Y S T E M D M I N I S T R A T O R A N U A L 36 •...
  • Page 37: Index

    8 Generating new Calling Card 33 Calling Card Account 18 HTTP GET interface 29 Components 9 4S Proxy/Registrar 10 SNOM 4S Mediaserver 10 The Application Server 10 Installation 13 Configuration 27 Installing the Application Server interface between Proxy/ Registrar and Mediaserver 27...
  • Page 38 A R D Y S T E M D M I N I S T R A T O R A N U A L Installing SNOM ProxyRegistrar 13 Installing the Web server 20 Viewing card or rate information MySQL 10...
  • Page 39 D M I N I S T R A T O R A N U A L Reader‘s Feedback snom technology AG welcomes your evaluation of this manual and any suggestions you may have. These help us to improve the quality and usefulness of our documentation.
  • Page 40 USA and Americas: India and SAARC: Europe & ROW: snom 4S Calling Card System Administrator Manual snom USA Representation snom technology (India) Pvt Ltd. snom technology AG 2 Feb, 2004, Version 1.00 ABP International, Inc. No. 417, International Trade Tower Pascalstr.

This manual is also suitable for:

S4scc

Table of Contents