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.
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...
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 .
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.
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...
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 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...
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.
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...
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...
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 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 ‘’,...
$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...
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...
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:...
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.
“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...
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 •...
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.
Need help?
Do you have a question about the 4S and is the answer not in the manual?
Questions and answers