How to use Log Files

1. How to log in

SSH  username@xx.xx.xxx.xxx

user: username (admin)

pass: password

 

SSH – the connection type you should use

admin – your User Name

xx.xxx.xxx.xx – the Host Name or the IP of the used partition

 

If you’re using putty.exe (for Windows) use :

Open putty.exe -> Host name : xx.xxxx.xxx.xx ; Default Port 22, Connection Type “SSH”

 

You will be prompted to

login to :                   //Type your username and hit Enter.

admin@xx.xxx.xxx.xx ‘s password:                  //Type your password and hit Enter

[admin@yate-10xx ~]$                                //10xx – partition number

 

2. How to execute commands

You can use the following:

sudo tail –f /var/log/yate – the option will allow real-time monitoring of new data in the yate log file as the file is growing. It will essentially displaying the last part of the file representing the current activity. You can monitor how calls are processed, the number of concurrent calls, if there are any registrations, any calls that are being rejected, any errors or warnings that are happening at the present

use “CTRL+C” to stop

sudo less –f /var/log/yate – Display the data in the file one screen.

Use “Page up” and “Page Down” buttons to browse.

Use “/SEARCH_TEXT” to search forward, where SEARCH_TEXT is the text you would like to look up

Use “?SEARCH_TEXT” to search backwards, where SEARCH_TEXT is the text you would like to look up

Use “n” to jump to the next search match

Use “N” to jump to the previous search match

Use “Q” to exit

cat /var/log/yate – Display the full contents of a file on the screen

grep “PATTERN STRING” /var/log/yate – Search file for lines that match a given pattern string.

Some examples of GREP command:

“cat  /var/log/yate | grep xx.xx.xxx.xxx” – displays all the lines that have IP address “xx.xx.xxx.xxx”

“cat /var/log/yate | grep ‘20110709 09:20:29’ “ – displays all lines with the processes that happened at the given time . You can see there more info about a certain call.  When you’re looking for a string that have ” ” /space/ in it, you should always put the string in quotation marks.

“cat /var/log/yate | grep 20110709 | grep xx.xx.xxx.xxx – displays the lines with that IP on the given day

“grep 1266346014-6472 /var/log/yate” –  search by call ID :  displays all info about a given call

Type “exit” to exit

 

3. How to read the displayed information

  • The line sending call to carrier [xx] endpoint [yyy]….  – Means that the calls was successfully sent to the provider ID xx with endpoint ID yyy .
  • The line failover call to carrier [xx] endpoint [yyy] …  – Means that the call was not connected from the first endpoint and was sent by the failover mechanism to the second endpoint.
  • account [xxxx] call not authorized for called [xxxxxxxxxx] authorized duration [0] – means that there is not enough balance in that account for the call to be authorized.
  • loop tariffs function returned error for account [xxxx], called [xxxxxxxxxxxx] caller [xxxxxxxxxxx]  – means that there is no active rate in the tariff from the Subscription plan for that called number. It indicates that there may be no rate or there is a rate but you didn’t provision and the rate is not effective. Another reason may be the end date of that rate to be in the past and thus the rate is not effective – expired.
  • The Line:   ROUTING: account [xxxx] get routes for route set [xx] called [xxxxxxxxxx] caller [xxxxxxxxxxxxxx] protocol [h323] capabilities [g729, g723,g723,alaw,mulaw]  –  shows the protocol and the codec when the call was received /the codec and the protocol the customer send the call/
  • no matching route prefix for account [xxxx] called [xxxxxxxxxxxxxxx]  – means that  there is no route to this number in the Route Set for that number
  • LINETRACKER: increase used instance ports: XX – means that a new call was initiated and the used ports are XX.  The number XX shows the current concurrent calls in the system.
  • AUTHENTICATION: account not found host [xx.xxx.xx.xx] port [xxxx]  – means that someone is trying to make a call from this IP , but there is no such account with that IP.
  • REGISTER: User Digest Authorization – user not found for username [username] – means that someone is trying to register with a username, but there is no such account with that username.
  • REGISTER: User Digest Authorization – found username [login] account [xxxx] endpoint [yyy] – Successful registration of endpoint yyy with username “login” and it was associated with account xxxx

 

4. How to use the CLI scripts

The CLI Script is Command Line Interface which allows you to perform specific tasks related to the switch. Help of all CLI commands can be reviewed typing just cli or cli –-help: [admin@yate-10xx ~]$ cli –-help

Usage of the CLI commands:

/bin/cli cache status – Checks status of in memory cache. The cache temporarily stores endpoint registration information as well as account parameters; it is being refreshed based on pre-configured interval – default 5 minutes for accounts and 1 minute for registrations.

/bin/cli routes status – Checks status of in memory routes database. The routes database is a local copy of the provisioned routes database.

/bin/cli cdr reload – Reload CDR processing configurations

/bin/cli cdr restart – Restarts the CDR processing engine

/bin/cli cdr state – Check the current cdr state. The CDR processing engine takes care of recording CDRs on file in directory /var/yate. Current records are inserted in file with extension CDT. Daily the data from CDT file is moved to a CDR file which contains all records for the date.

/bin/cli ps list – Lists all processes. Lists all processes currently running on the system.

/bin/cli ps status – Checks the processes status. Displays a snapshot of processes status.

/bin/cli qe reload – Reloads query executer configurations

/bin/cli qe restart – Restarts query executer (Query executer is connected with the processing of the CDRs). Query Executer merges all CDR records from the CDT file in real time and inserts them in the local MySQL data store for rating.

/bin/cli reg reload – Reloads the SIP registrations configuration

/bin/cli reg restart – Restarts the SIP registrations engine

/bin/cli rbx acc [tariff_id] [number] [duration] – Executes rating engine accounting request. The parameters in [] should be valid ID or numbers. This command will show you if the Rating and Billing engine finds a rate in the tariff for a specific number and calculates the charge for the given duration.

/bin/cli rbx auth [tariff_id] [number] [balance] – Executes rating engine authorization request. This command will show you if the Rating and Billing engine finds a rate in the tariff for a specific number and calculates the authorization time for the given balance

/bin/cli rbx cmd [rbx command] – Executes rating engine telnet command. For example: cli rbx cmd help

/bin/cli rte cmd [rte command] – Executes tax engine telnet command

/bin/cli rte reload – Reloads routing configurations

/bin/cli rte restart – Restart SIP routing engine

/bin/cli yate start – Starts Yate

/bin/cli yate stop – Stops Yate

/bin/cli yate restart – Restarts Yate

/bin/cli yate reload – Reloads Yate

/bin/cli yate log tail – Monitors Yate log

/bin/cli yate log view – Reviews Yate log

/bin/cli yate status – Reports Yate status

/bin/cli yate uptime – Reports Yate uptime

/bin/cli account clean [account id] – Cleans cache for a specific valid Account ID parameters and forces reload on next request

/bin/cli account lkup [account id] – Looks up for account cached parameters by valid Account ID: Minimum balance to make a call, Account minimum and   maximum authorized duration, Account maximum allowed concurrent calls, Account Route Set, Ingress Translation Set, Subscription plan and assigned Tariffs per Zones, Account Status (active / Inactive), Payment method, Account Credit Limit, Critical Balance, Account currency and current exchange rate.

/bin/cli cdr lkup dst [called number] – Finds calls by called number

/bin/cli cdr lkup dst [called number] src [calling number] – Find calls by called and calling numbers

/bin/cli cdr lkup id [session_id] – Finds a call by call Session ID

/bin/cli endpoint clean [endpoint id] – Cleans cache for endpoint by Endpoint ID

/bin/cli endpoint clean [ip] [port] – Cleans cache for endpoint by IP and Port

/bin/cli endpoint lkup [endpoint id] – Looks up for endpoint by Endpoint ID. It checks if this endpoint is currently registered or not.

/bin/cli endpoint lkup [ip] [port] – Looks up for endpoint by IP and Port

/bin/cli number lkup [did] – Looks up and display details for a specific DID number

/bin/cli route lkup [number] [account id] – Looks up and displays routes for an Account ID to a specific destination number

 

5. Log Files

/var/log/yate – YATE log for real time call processing information

/var/log/query_executer.log – log for the Query Executer process which merges call data into the MySQL data store for rating.

/var/log/ttserver_load.log – log of the routes provisioning process

/var/log/did_load.log – log file of the DID number provisioning and SIP registrations process

/var/log/mysqld.log – local MySQL server log file

/var/log//var/log/memcached.log – log of the local cache

/var/log/avavoip_cdr_repairer.log – log file of the CDR repairer mechanism which takes care of hung calls during system startup

/var/log/cdr_mysql_partitioning.log – log file of the daily MySQL CDR partitioning job