Manual of LVP Linux version


 

News | Description | Forum | Contacts
 

Manual of LVP Linux version

 

Software  LVP developed  for routing VOIP traffic, running under Linux.

General Networks Company distribute three versions of the SoftSwitch.

1)      SoftSwitch for traffic basic routing - light version

2)      SoftSwitch for traffic routing with build-in IVR scripts for debit platform and static virtual office - professional version.

3)      SoftSwitch  for traffic routing with IVR scripts and virtual office and software interface for billing systems (enterprise version).

 

For convenient we propose monitoring software to monitor remotely traffic.

 

SoftSwitch  configured by configuration file.

Let us consider configuration file for light version

 

# example of configuration file for linux voice proxy(lvp) program

# lines that begins with symbol "#" or ";" are ignored (comments)

# all symbols after ";" are ignored (comments)

;

;

 

[Aliases]

# format:

# host alias    ip_address [, ip_address ...]

test   100.16.45.114,111.16.44.4                                           ;  Here we define names  of  the servers  to use them further

test1 100.16.11.2

host_admin      10.10.10.10

 

[Friendly_Hosts]

#list of aliases that can establish a phone connection

#to our voice proxy program

#(other words - can open port 1720)

#all other hosts will be rejected during opening tcp port

# syntax: HOST  [[+/-]prefix] [aon_authorization_filename] [account=aon | IP] ; aon_authorization_filename – file with list of ani, which can make call  

# example: cisco5300 -6000 aon.txt                                                               ; account=aon option that allows  

;                                                                                                                        to write accounting for user with ani or IP (for default accounting write as server calls).

#          cisco_definity aon_definity.txt

#          cisco_another

#          cisco_another2 +3000

# note: prefix(if exist) MUST start with '+' or '-' character!

 

; Prinemaem zvonki ot vseh hostov!                

unknown_host   -1234 +14459751 file_billing auto_progress maxconn=2; this command allows us to accept calls from any servers

                                                                                              ; we write accounting to text file

                                                                                              ; When we open connection we send progress message and we do not relay setup and term cap.,   

master slave determination.

                                                                                              ; we transit only connect  and alerting

                                                                                              ; here in dnis  we cut prefix  and add new one, here maximal simultaneously connections no more than 2.

 

test1 udpacct=host_admin       quality=2                                 ; Here we allows us to accept connections from test1 and send udp accounting to host_admin and assume that

                                                                                              ; we provide service with quality=2

[InterFaces]                                                                            ; we define names of interfaces LVP

eth0 11.16.45.101

eth0:3 11.16.44.81

lo   127.0.0.1

[Global]                                                                                  ; we define global parameters

ddl=5 ; default debug level. correct values range 0..7 (0-lower, 7-higher)

      ; recommended value = 4 (0=no any output&files debug only billing aviable)

      ; 6 - be careful, all tcp messages saved in logs_fd directory !!!

      ; 7 - be careful, full udp send/recv debug !!!

      ; level 6 and 7 is not recommended to set for a long time period

Calls_Log_File=lvp_v2.txt ; billing information file                   ; we define billing file name

Account=5202 ; global user account                                       ; We define account name to write accounting of outgoing leg

                                                                                              ; We write Incoming leg accounting for IP address of originating server

 

TimeOuts=5,5,40,120,0,3,360 ; (global  TimeOut_N0,... TimeOut_N6)                    ; We define timeouts

    ; TimeOut_N0 = receiving SETUP packet message from ORIGINATE side

    ; TimeOut_N1 = opening port 1720 on target host

    ; TimeOut_N2 = receiving ALERTING packet message from ANSWERING side

    ; TimeOut_N3 = receiving CONNECT packet message from ANSWERING side

    ; TimeOut_N4 = pause before sending ReleaseCompleteMSG

    ;           to ORIGINATE/cancel connection

    ;    (after receiving Answering ReleaseCompleteMSG and no more route available)

    ; TimeOut_N5 = pause after end of the call

    ;    (with a hope that Originate client will initiate a break of tcp connection)

    ; TimeOut_N6 = timeout for udp data.

    ;   If no udp data available from OR or AN sides for a specified seconds

    ;    Then ReleaseMSG with Cause=Normal, unspecified(31) sent to ORiginate

    ;   Note: TimeOut_N6 start checking for udp data after ConnectMSG only.

; all TimeOuts values are in seconds

MaxPhoneConnections=160 ; max number of simultaneous phone connections

Default_Incoming=eth0:3 ; interface for listening tcp 1720 port

Default_OutGoing=eth0:3 ; interface from which program will connect to 1720 target/remote host

Max_Connection_Duration= 3600; in seconds

AON_out_file=aon_phones_out.txt; file with phones for replacing CallingPartyNumber

 

user=proxy                                                                             ; User name to run SoftSwitch LVP

 

[Routing]                                                                                ; This section defines  routing rules

#format:

# +phone pattern [time of call hh:mm-hh:mm] [weekday]

# weekdays { 0/sun = sunday, 1/mon = monday , ... 6/sat = saturday }

 

# first  target_host_alias [+/-]prefix TimeOut_N1,... TimeOut_N6 [Send_From_Interface]

# second ......            TimeOut_N1,...N6 [Send_From_Interface]

# third  ......

; ---------------------------

; local TimeOuts(if specified) for the server override global Timeouts values

; TimeOut_N1,... TimeOut_N6 = see global description of timeouts

; Note: * = means global value timeOut, 0 = No TimeOut

; Example: AS53_ia     +11##       15,20,*,0,3

;          ^^^^^^^^^^host ^^^^^prefix ^^^^^^^^^^timeOuts(N3,N6=global N3,N6;N4=absent)

;

;

 

+14459751                                                                            ; All calls that begin with 14459751 route

test   -14459751 +3899                                                         ; to test, and, cuts prefix and add 3899

test1  -14459751 +3899                                                        ; if first route is unsuccessful we try next one

 

+       host=test                                                                       ; here all calls from server test route to the next route

test1   +3899

 

+14459751  +7095                                                                ; This dial-pear runs if ani begins on 7095

test1  -14459751 +3899

 

+14459751  +7095 quality=2                                                 ; This dial-pear runs if ani begins on 7095 if quality service 2

test  -14459751 +3899

 

The dial-pear used if server quality of service >= dial-pear quality of service.

 

It is very easy to configure light version. The main idea is to list all servers, put all prefixes and write routes for termination. Note that accounting consists two legs – incoming leg and outgoing leg. For default Incoming leg accounting  is writing   for IP address originating server and outgoing leg accounting is writing for Account ( in our case is 5202).

 

Let us consider features of business version.

Business version using for transit traffic routing and for debit cards platform which running using build in IVR scripts. Accounting writing to text file or SQL server. You can use list of IVR scripts which can authorize cards users and route calls. You can use the following format of the command

auto_connect_lvp [aon] [ru] [idd=0] [Pseudo_alerting=on]

Let us consider syntaxes: - auto_connect_lvp keyword that means starting script (here originating server receives connect message); - aon  is keyword that means we start ani authentication; ru means that we run Russian language (so we play sounds with prefix ru_); idd=  defines time in ms during we ignore same keys.; Pseudo_alerting=on – option that cause to sent alerting message before connect message (some equipment can hang if they do not receive alerting).

To use scripts you have to write voice the following files

ru_say_user_busy

ru_say_problem_connecting

ru_say_no_data

ru_say_bad_digits_count

ru_ring

ru_ask_pincode

ru_ask_phone

ru_ask_account

It is ease to understand content of the files from the names.

The scripts used SQL procedures which make authentication, authorization and accounting. Software interface we provide for additional request.

After entering phone number SoftSwitch looking for acceptable route according to routing table. Note that these scripts can not say numbers (it is possible in enterprise version), that is why you need to use external service to play amount of money or time. For that purpose we use cisco. Let us consider example

+7111111111

auto_connect_lvp      

10.20.18.11          +10102  noAonOut    amount  continue

 

Here we state that after authorization we make call to 10.20.18.11 and add prefix 10102 as ani  send amount of money and maximum of time call separated #. We wrote cisco script which can say amount money and time. Command continue means, that even after successful call we continue find next dial-pears from section [Routing].

 

This version can make authenticate users using section [Friendly_Users].

For Example

[Friendly_Users]

10184 3423412344 ani

10184 234444  123432

102057 122303 406828

First column sign id user, second one means account number or ani, third one mean pin code or keyword ani.

When we define users in section  [Friendly_Users] then client can be authenticated locally and no SQL used. Time of the call can be no longer one hour.

Let us consider configuration file example

 

# example of configuration file for linux voice proxy(lvp) program

# lines that begins with symbol "#" or ";" are ignored (comments)

# all symbols after ";" are ignored (comments)

;

 

 

[Aliases]

# format:

# host alias    ip_address [, ip_address ...]

definity 153.18.12.1

c3620              251.179.241.69,159.10.1.205

as5300            159.10.41.193,159.5.4.82

 

[Friendly_Hosts]

#list of aliases that can establish a phone connection

#to our voice proxy program

#(other words - can open port 1720)

#all other hosts will be rejected during opening tcp port

# syntax: HOST  [[+/-]prefix] [aon_authorization_filename] [Pseudo_Alerting=on/off]

# example: cisco5300 -6000 aon.txt

#          cisco_definity aon_definity.txt

#          cisco_another pseudo_alerting=off

#          cisco_another2 +3000 Pseudo_Alerting=on

# note: prefix(if exist) MUST start with '+' or '-' character!

 

c3620              -810

as5300-sta      -810 ani=20608 account=1121           ; For ani=20608 in billing file we write 1121

as5300-sta      -810 account=IP                                 ; for arbitrary ani we write account as IP address

definity             -11##810 aon.txt                                ; Here is permitted only if ani listed in file aon.txt

 

 [Friendly_Users]

10184 3423412344 ani

10184 234444  123432

102057 122303 406828

 

[InterFaces]

eth0:00 10.10.10.1

lo0 127.0.0.1

eth0 159.4.2.12

eth00 159.4.2.18

 

[Global]

ddl=5 ; default debug level. correct values range 0..7 (0-lower, 7-higher)

      ; recommended value = 4 (0=no any output&files debug only billing aviable)

      ; 6 - be careful, all tcp messages saved in logs_fd directory !!!

      ; 7 - be careful, full udp send/recv debug !!!

      ; level 6 and 7 is not recommended to set for a long time period

Calls_Log_File=lvp_v2.txt ; billing information file

Account=2202 ; global user account

TimeOuts=5,8,50,70,0,0 ; (global  TimeOut_N0,... TimeOut_N6)

    ; TimeOut_N0 = receiving SETUP packet message from ORIGINATE side

    ; TimeOut_N1 = opening port 1720 on target host

    ; TimeOut_N2 = receiving ALERTING packet message from ANSWERING side

    ; TimeOut_N3 = receiving CONNECT packet message from ANSWERING side

    ; TimeOut_N4 = pause before sending ReleaseCompleteMSG

    ;           to ORIGINATE/cancel connection

    ;    (after receiving Answering ReleaseCompleteMSG and no more route available)

    ; TimeOut_N5 = pause after end of the call

    ;    (with a hope that Originate client will initiate a break of tcp connection)

    ; TimeOut_N6 = timeout for udp data.

    ;   If no udp data available from OR or AN sides for a specified seconds

    ;    Then ReleaseMSG with Cause=Normal, unspecified(31) sent to ORiginate

    ;   Note: TimeOut_N6 start checking for udp data after ConnectMSG only.

; all TimeOuts values are in seconds

 

 

MaxPhoneConnections=160 ; max number of simultaneous phone connections

 

;Tcp_Listen_Port=1719; if commented - default 1720 used

;note: tcp_listen_port if specified MUST appear before Default_Incoming...

Additional_Listen_Port=1725                         ;           Secure additional port

Default_Incoming=eth0                                               ;           IP address to start listen

Default_OutGoing=eth00 ; interface from which program will connect to 1720 target/remote post

Max_Connection_Duration=7200; in seconds

AON_out_file=aon_phones_out.txt; file with phones for replacing CallingPartyNumber

MsSql=           10.10.1.1         user      bdf2isdffcdjyjdfk1p                 5                                 10

;                       ^^ serverIP      ^^login             ^^ encrypted_password          ^connect_TimeOut      ^query_TimeOut

;           Example to configure login to SQL сервер, this is for stored procedure calling and accounting writing.

user=lvp                                 

bill_bad_routes; every bad route will be written to SQL, to account: bad         ;

 

 

[Scripting]

language=ua                                                                ;           Global parameter which use as default prefix to play file prompt

digit_input_timeout=5                                                  ;           Global timeout to mean end key input

identical_digits_delay=0; in milliseconds                       ;           Global parameter idd

digit_input_pause_after_connect_msg=2                     ;           Time after connect message we do not accept any keys to cut off garbage

 

[Routing]

#format:

# +phone pattern [time of call hh:mm-hh:mm] [weekday]

# weekdays { 0/sun = sunday, 1/mon = monday , ... 6/sat = saturday }

 

# first  target_host_alias [+/-]prefix TimeOut_N1,... TimeOut_N6 [Send_From_Interface]

# second  TimeOut_N1,...N6 [noAonOut] [Pseudo_alerting=on/off] [Send_From_Interface]

# third  ......

; ---------------------------

; local TimeOuts(if specified) for the server override global Timeouts values

; TimeOut_N1,... TimeOut_N6 = see global description of timeouts

; Note: * = means global value timeOut, 0 = No TimeOut

; Example: AS53_meria     +11##       15,20,*,0,3

;          ^^^^^^^^^^host ^^^^^prefix ^^^^^^^^^^timeOuts(N3,N6=global N3,N6;N4=absent)

;

; instead of the host name you can use the following reserved words:

; auto_connect_lvp      -       lvp program becomes as ANSWERING side

; mssql                 -       lvp program takes server_IPs from MSSQL Server

;

; Example:

 

+00

auto_office_pickup                                          ;           If called number starts 00 we start intercept calls for Auto office

 

 

 

+                                                                    ;           All traffic we send to next routes

10.10.10.100

153.18.12.1

159.10.41.193

 

+  quality=2                                                                ;           All traffic we send to next routes if quality=2

10.10.10.10

153.18.12.11

159.10.41.13

 

 

+123

a_o main ext=suffix pseudo_alerting=on ddl6   ;           Here we start auto office when called number begins from 123

                                                                                  ;           If called number longer then 123 we use suffix as an extension of Auto Office

                                                                                  ;           before connect message we send alerting message 6

                                                                                  ;           manual of Auto office look below

 

[Bind_Routing]

#to_alias_or_ip send_from_alias_or_ip            ;           to servers from first column we send from IP from second column

153.18.12.1                eth0

251.179.241.69          59.4.2.12

159.10.41.193            159.4.2.18

 

Auto Office defined in file lvp_ao.conf, if the main configuration file is lvp.conf.

 

Let us consider example of Auto Office configuration file

[main]

udp_accounting=10.10.2.1,10.10.2.6 ;           We send udp accounting to servers with IP

prompt_file=ru_say_hello_office                      ;           Hello file after we connect to Auto Office

delay=2                                                          ;           Time after connect message we do not accept any keys to cut off garbage

access_international=9810        ;                     ;           International code to transfer calls

access_national=98              ; ...                      ;           National code to transfer calls

access_local=9            ; ...                              ;           City code to transfer calls

code_tech=810                                               ;           Technical prefix to make calls

code_country=7            ; ...                             ;           Country code where we are

code_city=7095             ; ...                            ;           City code where we are

;                                 

;           When we put 92331122 receive -9, +7095, +810 =81070952331122          - local

;           When we put 9891612312322            -98, +7, +810=810791612312322     - national

;           When we put 981012122233445        -9810, +810=81012122233445         - international

;

office_code=000111              ; ...                    ;           We put office code to make accounting calls inside auto office

                                               ;           For example call +1  will be accounted as 0001111

redirect_code=*21;              ;              ;           Code to make transfer call

                                                                       ;           When user put *21 then he can transfer call to any number,

;           using transformation described above

pickup_access=13.18.12.21                           ;           IP address that is allowed to request intercept calls

voicemail_file leave_mail                                  ;           voice file that informs that you are unavailable please leave a message

voicemail_pass prompt_pass                           ;           voice file that informs that enter a password to listen voice mail

voicemail_prompt prompt_number                  ;           voice file that informs that enter voice mail number to listen

 

password 123672        +8                               ;           voice mail password for extension 8

password 123674        +1                                ;           voice mail password for extension 1

+1                                                                  ;           routing rules for extention 1

10.10.1.2        +231    5,7,30,0,0,0 noAonOut           ; for begin we send call to 10.10.1.2 using number 231(it is not prefix) with timeout numbers  

;           and send original ani (do not remove)

voicemail                                                        ;           I first route unsuccessful we run voice mail

                                                                       ;          

                                                                       ;           initially it plays voicemail_file,

                                                                       ;           if you would like personal information make vm1_leave_message (here 1 is extension number)

                                                                       ;           if you would like to change prompt during playing prompt enter your password finished # and

                                                                       ;           say new prompt

 

+                                                                    ;           If no special extension we run following routes

10.10.1.1         +132   5,7,30,0,0,0  OR noAonOut ;  OR means, that the next route can be started simultaneously with current route

10.10.1.2        +231    5,7,30,0,0,0 noAonOut

 

 

+8

voicemail listen                                    ;           We need to enter correct password  after voicemail_prompt we can listen messages

                                                                       ;           if we enter 0 then we listen all messges and *# to erase all messages

                                                                       ;          

 

 

 

 

Let us consider features of enterprise version

 

The main features of the version are extended functions of SQL interface and IVR scripting language.

Extended function of SQL interface related to possibility of traffic managing via SQL, users and servers’ authorization and virtual office programming.

IVR language scripting allows us to get additional functionality of virtual office “autooffice”. There are functions that allow to say time, phones, numbers. There are commands if else endif (no limitation on inclusion quantity), do while (up to 5 inclusions).

 

Let us consider SQL functions. SQL server provides accounting calls and that is why it is logically to allow it to manage of routing.  To route every call by  SQL it is very hard task for modern computers. We propose to upload routing table to softswitch. If we change routing on SQL we make synchronization with Softswitch. That allows to dramatically optimize performance and make routing ever SQL server down. Softswitch every time has own copy of routing tables. It is conveniently to allow corporative users have possibility to make calls every time ever SQL server down too. We make local copy of that users and synchronize them with SQL server. Users can make changes of “autooffice” via WEB. So there is procedure to make synchronization with softswitch.

The autooffice extended to use IVR scripting language.

Let us consider language.

We try to make language similar to basic. In the body of autooffice you can find autooffice commands and scripting operators. Scripting commands begin with keyword operation.

Let as consider commands of autooffice configuration.

 

 [main]                                                             ;           Autooffice Name        

udp_accounting=10.10.2.1,10.10.2.6 ;           We send udp accounting for monitoring

prompt_file=ru_say_hello_office                      ;           Hello file name

information_file =ru_info                                  ;           Additional information file ( Initially play prompt_file and after information_file)

delay=2                                                          ;           Delay of key inputting to block garbage

max_extension_length 4                                   ;           The maximum of numbers in extensions (we do not need to wait end inputting timeout)

access_international=9810        ;                     ;           International code access (for forwarding calls)

access_national=98              ; ...                      ;           national code access (for forwarding calls)

access_local=9            ; ...                              ;           city code access (for forwarding calls)

code_tech=810                                               ;           technical prefix (for forwarding calls)

code_country=7            ; ...                             ;           country code

code_city=7095             ; ...                            ;           city code

 

;                                 

;           When we receive 92331122 then we get -9, +7095, +810 =81070952331122          - local city

;           When we receive 9891612312322      -98, +7, +810=810791612312322     - national

;           When we receive 981012122233445 -9810, +810=81012122233445         - international

;

system                                                            ;           if this command is presented we can change parameters,

;           as ani, baccount (account to write billing)

 

office_code=000111              ; ...                    ;           We setup autooffice for traffic accounting internal calls code

                                               ;           For example if we call +1 then we get call accounting to phone like 0001111

redirect_code=*21;              ;              ;           this code used to make forwarding calls

                                                                       ;           When internal user put *21 then it is possible to forward call to any number,

;           using translation rules described above

pickup_access=13.18.12.21                           ;           this server to be allowed to make interceptions of calls

voicemail_file leave_mail                                  ;           this file says please leave a message

voicemail_pass prompt_pass                           ;           Please enter password to listen voicemail message

voicemail_prompt prompt_number                  ;           Please enter number of message to listen or 0 to listen of all message or *# to erase all mesages

password 123672        +8                               ;           password of voicemail extension 8

password 123674        +1                                ;           password of voicemail extension 1

 

 

 

Let us consider Autooffice commands.

Extensions begin by +

Example

+001

Further there are routes

Example

10.10.10.3 +20           here +20 is not prefix, it is full extension number. Here after successful call the autooffice job has been finished.

There are additional commands.

A_o main ext=5 info    - it is mean that we have go to begin of the Autooffce main and do not play Hello, only play information_file and go to extension 5. Two last parameters are optional.

pause=9           - make pause 9 seconds.

play_prompt  file_name            - play voice file file_name

voicemail          - run program to write voicemail and it starting by playing message from file voicemail_file

voicemail listen - run program, which have to play file voicemail_pass, and after correct inputting password play file voicemail_prompt, if you enter message number it play message. If you enter 0 it play all messages and if you enter *# then all files has to be erased.

 

If there is mistake in the command then this command has to be ignored.

If the end list of command has been reached the Autooffice stops.

Let us consider operators of the script.

Operation [command]

Here [command] – is command. Scripting language has only predetermined variables and constants. All variables and constants are keeping in memory as texts. There are variables which can be interpretive as a text and there variables which can be interpretive as a text or an integer.  There exist the following constants

 

ani – calling number

dnis – called number to run Autooffice

ListenIP  IP which is listen to run lvp

originIP IP of originating call server

Null      - empty string

result   - last operation result

cm_account     - account id, which has been authorized in Call manager

false –‘0’

true –‘1’

 

There are special variables

baccount – this is system account to write to billing system and CDR

bani         - this is ani to use as ani for PlaceCall and Call commands (they can be changed if system option is used, after end of call default values has to be restored)

 

There are variables which are strings only

ip
account
baccount
bani
pin
dnis
ani
phone

 

The following variables can be as strings and integers

local

quality

book

country

time

money

num1

num2

..

num0

Last_Call_Release_Code

There is introduced Array with 100 elements from 0 to 99.

There are two alternative methods to use array elements. First one is as example Array10; The second one is indirect as examples

read num0 num1  - read value Array[num1] into num0

put num0 num1 write value Array[num1] into num0

 

Let us consider command set:

SET timeout 5   - it sets timeout for input command

set local 1  - it sets local convergence number into normalized form
set country ua|ru|en…  - it sets country origin to use it in setup message
set quality 2  - it sets quality service to make call ( this parameter also can be included in setup message)

set clearinput 1  - it sets flag to clear key buffer before command  input

set release_code ##   - it sets key sequence to have possibility to interrupt Autooffice by answering side

set pause_after_connect 0 - it sets time of ignoring keys after connect message to protect garbage if we call to autooffice

set language [ua|ru|en|...]           - it sets language to play prompts and play numbers.

 

set interrupt_say 1 [0]   - it sets is it possible to interrupt commands say_number say_phone if any key received

 

operation set signal_busy 1 [0]  - it sets stay for PlaceCall if unsuccessful call obtained to play busy signal for 5 seconds

 

set cm_account num0  - it sets account id for Call manager, if there is same id then that call has to be canceled.

 

set fh_file_billing 1|0  - if it is 1 then accounting is writing to file only, if it is 0 then in SQL firstly
set digit_input_pause_after_connect_msg integer_value  - it sets time to ignore keys after connect message if we call from autooffice

set Last_Call_Release_Code code – it  sets release code value

play_till_connect prompt_file  Play file until receiving connect message
play_till_alerting prompt_file  Play file until receiving alerting message

 

 

There are functions for string and integer manipulation

LEFT num1 num2 num3    num1=left(num2, num3)  num3 left symbols num2 into num1

RIGHT num1 num2 num3  num1=right(num2, num3) num3 right symbols num2 into num1

SHIFT  num1 num2 num num3     num1= strcpy(&num2+ num3) cuts num3 left symbols

INT Num1 Num2     Num1=Int(num2) convert into integer string num2

Incr num0 – adds 1 to num0

Decr num0 – decrement 1 to num0  

ADD num0 num1 num2   - string adding num0=num1+num2  (example 777+777=777777)

 

There are commands if else endif. They can be used with GE GT LE LT EQ NE. Example:

 

IF GE money num1

…

ELSE

…

ENDIF – end of condition command.

There are unlimited inclusions.

There are commands

do    

…         

while GE| GT| LE| LT| EQ| NE num1 num0 

It is possible up to 5 inclusions.

 

Let us consider service functions:

Input  prompt prompt_err num1 n1 n2 n3    -  this command play файл prompt if any errors then play prompt_err, We wait for entering keys up to n1 keys or to # , no less n2 keys, We retry up to n3 times and use timeout from command set timeout or global timeout, if command successful then result=’1’

PlaceCall phone time – make call to phone and set maximum connection time

call phone time ip         - make call to IP address using number phone and maximum connection time

kill_calls num0              - kills all session with account id equal to num0

local_user_aut account pin   - make authentication locally using account and pin   (it can be used users loaded from sql)

 

It can be used to function to run SQL stored procedures:

 

exec num0 “”  example exec num1 procedure_t  account  pin – here num1 received result of running of procedure, if running has been successful then result equal 1.

The next function is according to example

execa 10 procedure  account  pin – it writes result into Array beginning from 10th element. In other words result has been obtained in Array[10] Array[11] so on. If running has been successful then result equal 1.

 

Let us consider examples to use SQL stored procedures

 

Operation execa 0 GetPhones account    - it returns phone book of the user to Array[0] - Array[9]

execa 10 GetAni  account     - it returns approved ani of the user into Array[0] – numbers of elements, and list into Array[1] - Array[.]

 

execa 0 authenticate account  pin 

Returns

1 – Error code

2 – id_customer

3 - balance

4 – quality

 

Error codes can be as following

0 - Success
1 - Customer not found
2 - bad password
3 - Balance of customer below zero
4 - account disable
5 - account blocked
6 - account is locked out
7 - customer is calling now
8 - customer agent blocked
9 - dealer blocked
10 - Server not found
11 - Prefix not present
12 - Real phone number is zero length
13 - Destination region not present
14 - Rate for country not defined

 

exec money authentic  account  pin  - it authenticates user and we get money

exec num0 unblock_call           account            it unblocks accounts and get

Num0

0          - it has been ublocked

1          - error

 

Operation exec time authr account  phone  listenIP      - It authorizes call for listenIP to phone and in result we receive maximum connection time

Operation execa 0 authorize account  phone listenIP  -similar procedure but we receive extended error codes as in previous case    

0- Errors

1- time insec

2- time in min

 

 

operation execa 0 Virtual account listenIP 

 

0 Error code

1 account

2 number

3 time

4 min

5 sec

6 multi_connections {false|true}

7 id_customer

8 IP address

 

 

 

operation exec phone check_ani ani ; if existed phone 1 else 0

 

operation exec phone add_ani account ani  ; if OK phone 1 else 0

 

operation exec phone del_ani  account ani ; if OK phone 1 else 0

  

operation exec number0 ChangePhone account phone number ; if OK number0= 1 else 0

 

exec num0 add_phone account phone num9     it adds phone in the cell num9, if OK then num0=0

exec num0 del_phone account num9     We erase phone for account in the num9, if OK then num0=0

 

Let us consider example of the Debit script with possibility to authenticate using ani.

To run this script we use

A_o debit_ani   ext=5

If we do not want to use ani please run

 A_o debit_   ext=5

 

[debit_]    ;Autooffice to do not use ani

[debit__proc]     ;Autooffice to make authentication using account and pin

[debit_ani_proc]  ;Autooffice to authenticate ani

[debit_PlaceCall] ;Autooffice to make calls

;     At the begin we list all autoofice

[debit_ani]       ;Autooffice to start authentication using ani

system            ;this option allows to change baccount and bani

account office    ;this account using for accounting

 

+5                ;just indicate extension 5

operation const num0 0  ; initialize variables

operation const num3 3

Operation Const book 0                    ; Is downloaded Phonebook

operation set country ru     ;set country                

operation set language ru    ;set language

     

operation set quality 2      ;set quality of the service by default 2

     

Operation Set local 1                           ; To normalise number localy

operation set clearinput 1                      ; Before input clear key buffer

operation set signal_busy 1  ;set option to play busy signal when got error to place call

 

operation set interrupt_say 1 ;allow to interrupt prompts and say numbers

pause 2                      ;just wait 2 seconds

a_o debit_ani_proc ext=5     ;Go to autooffice to make authentication

     

 

 

     

     

[debit_ani_proc]             ;Autooffice to make authentication using ani

system                       ; system

account office

 

+5                           ;just extension number

operation Const local 0      ;set vatiable, if user authenticated locally

 

operation set digit_input_pause_after_connect_msg 0 ;

Operation Const num6 ani     ;write string ani into num6

Operation Get account ani    ;write value ani into account

 

operation local_user_aut account num6    ; try to authenticate using ani locally

 

operation IF EQ result true              ; if authenticated

operation Const local 1                  ; set up flag

A_o debit_PlaceCall ext=5                ; go to place call

operation endif

     

                &