Sunday, February 28, 2010

A codec is a device or computer program capable of encoding and/or decoding a digital data stream or signal. The word codec is a portmanteau (a blending of two or more words) of 'compressor-decompressor' or, more accurately, 'coder-decoder'.

Firstly the voice is converted into digital form and then it's compressed to reduce the consumption of network bandwidth required to transmit the speech to the receiving party.

MOS stands for "Mean Opinion Score". MOS measures the perceived quality of audio after it has been compresses by the particular codec, transmitted, and decompressed. The score is assigned by a group of listeners using the procedure specified in ITU-T standards P.800 and P.830. The interpretation of individual MOS values is as follows:

5

Excellent  

4

Good  

3

Fair  

2

Poor  

1

Bad  

G.711

  • G.711 is a codec that was introduced by ITU in 1972 for use in digital telephony, i.e. in ISDN, T.1 and E.1 links.
  • The codec has two variants:
  • A-Law is being used in Europe and in international telephone links,

  • u-Law is used in the U.S.A. and Japan.
  • G.711 uses a logarithmic compression. It squeezes each 16-bit sample to 8 bits, thus it achieves a compression ratio of 1:2.
  • The resulting bitrate is 64 kbit/s for one direction, so a call consumes 128 kbit/s (plus some overhead for packet headers). This is quite a lot when compared with other codecs.

This codec can be used freely in VoIP applications as there are no licensing fees. It works best in local area networks where we have a lot of bandwidth available. It's benefits include simple implementation which does not need much CPU power (can be implemented using a relatively simple table lookup) and a very good perceived audio quality - the MOS value is 4.2.

G.729

  • G.729 is a codec that has low bandwidth requirements but provides good audio quality (MOS = 4.0).
  • The codec encodes audio in frames, each frame is 10 milliseconds long.
  • Given the sampling frequency of 8 kHz, the 10 ms frame contains 80 audio samples. The codec algorithm encodes each frame to 10 bytes, so the resulting bitrate is 8 kbit/s for one direction.
  • When used in VoIP, we usually send 3-6 G.729 frames in each packet. We do this because the overhead of packet headers (IP, UDP, and RTP together) is 40 bytes and we want to improve the ratio of "useful" information.
  • G.729 is a licensed codec. As far as end users are concerned, the easiest path to using it is to buy a hardware that implements it (be it a VoIP phone or gateway). In such case, the licensing fee has already been paid by the producer of the chip used in the device.
  • A frequently used variant of G.729 is G.729a. It is wire-compatible with the original codec but has lower CPU requirements.

G.723.1

  • G.723.1 is a result of a competition that ITU announced with the aim to design a codec that would allow calls over 28.8 and 33 kbit/s modem links.
  • There were two very good solutions and ITU decided to use them both. Because of that, we have two variants of G.723.1.
  • They both operate on audio frames of 30 milliseconds (i.e. 240 samples), but the algorithms differ. The bitrate of the first variant is 6.4 kbit/s and the MOS is 3.9.
  • The bitrate of the second variant is 5.3 kbit/s with MOS=3.7. The encoded frames for the two variants are 24 and 20 bytes long, respectively.
  • G.723.1 is a licensed codec, the last patent that covers it is expected to expire in 2014.

GSM 06.10

  • GSM 06.10 (also known as GSM Full Rate) is a codec designed by the European Telecommunications Standards Institute for use in the GSM mobile networks.
  • This variant of the GSM codec can be freely used so you will often find it in open source VoIP applications.
  • The codec operates on audio frames 20 milliseconds long (i.e. 160 samples) and it compresses each frame to 33 bytes, so the resulting bitrate is 13 kbit/s (to be precise, the encoded frame is exactly 32 and 1/2 byte, so 4 bits are unused in each frame). The codec's Mean Opinion Score is 3.7.

Speex

  • Speex is an open source patent-free codec designed by the Xiph.org Foundation.
  • It is designed to work with sampling rates of 8 kHz, 16 kHz, and 32 kHz and can compress audio signal to bitrates between 2 and 44 kbit/s.
  • For use in VoIP telephony, the most usual choice is the 8 kHz (narrow band) variant.

iLBC

  • iLBC (internet Low Bit Rate Codec) is a free codec developed by Global IP Solutions. The codec is defined in RFC3951.
  • With iLBC, you can choose to use either 20 ms or 30 ms frames and the resulting bitrate is 15.2 kbit/s and 13.33 kbit/s, respectively.
  • Much like Speex and GSM 06.10, you will find iLBC in many open source VoIP applications.

Wednesday, March 18, 2009

scheduling a task to mail one file as attachment

use crontab -e to edit the crontab

and then write the below line ( modify the time and date as per your need)

25 20 */15 * */5 mail -s "testing mail for usera " usera@gmail.com < /etc/sysconfignetwork-scripts/ifcfg-eth0

Friday, March 13, 2009

vi editor tricks

R replace mode
ESC normal mode
CTRL-g show filename, current location in the file and status
SHIFT-g goto the end of file

:set ic search ignore cases
de delete to the end of word
dw delete to the end of word+space
d$ delete to the end of line
d^ delete to the begin of line

CTRL-R redo the last command

:r filename insert the contents of the file
:!command execute external command

Saturday, March 7, 2009

IP SCANNING in Linux

No need to use any ip scanner software to scan ips in your network.

Just sse nmap.

nmap -sP 192.168.10.1-255 > prakash.txt

Thursday, March 5, 2009

just for me

awk '{print $1}' /root/test

this command will print the first column from this file. Type print $2 to print second column


for i in `cat /root/test`;do cp /log/asterisk/monitor/monitor/$i /root/records/;done


this command will read names of files from the file /root/test and copy these files from /var/log/asterisk/monitor/monitor directory to the /root/records file

Saturday, February 28, 2009

Friday, February 13, 2009

Modify output of historycommand

just write the below command

export HISTCONTROL='!ignorespace'
export HISTTIMEFORMAT=’%F %T '

Friday, January 30, 2009

replace a string from name off all files in a directory.

To replace a particular string from the name of all files in a
directory follow the below steps

  • create a file script.sh and change its permission to 644
  • write the below thing in the script
here in the below example we are replacing the string in with all from
all files in the directory.

for f in *-in.wav; do mv "$f" "${f%-in.wav}-all.wav"; done

Tuesday, January 20, 2009

Searching a particular string from unknown file or to search a file from the known string of that file

grep string_to_Search * -Rn

note:- the string here (a sentence or word) is the one which is there in some unknown file and you want to know the name of that file.

Thursday, January 8, 2009

HIDING SSH CONNECTION

use the below command to hide your ssh connection

ssh -T user@host /bin/bash/ -i

Thursday, December 11, 2008

Blink Network card light on Linux

To blink light of LAN card continuously

ethtool -p eth0 5

this command will start eth0 LAN card blinking for 5 seconds.

Tuesday, October 7, 2008

Over come rm command limitation

To delete a large number of command when rm command fails.

 echo * | xargs /bin/rm -f

or use this 

find /path/to/files/ -type f -exec /bin/rm -f {} \;

or

ls | xargs rm -rf *

Finding all .mp3 files and move to new directory from shell prompt

find / -iname "*.mp3" -type f | xargs -I '{}' mv {} /mnt/mp3

Friday, October 3, 2008

PING ERRORS

TL Expired in Transit
This error message means that the number of required hops exceeds the Time to Live (TTL). To increase TTL, by use the ping -icommand. A routing loop may exist. Use the Tracert command to determine whether misconfigured routers have caused a routing loop.
Destination Host Unreachable
This error message means that no local or remote route exists for a destination host at the sending host or to a router. Troubleshoot the local host or the router's routing table.
Request Timed Out
This error message means that the Echo Reply messages were not received in the designated timeout period. By default, the designated timeout period is four seconds. Use the     ping -w command to increase the timeout.
Ping request could not find host
This error message means that the destination host name cannot be resolved. Verify the name and the availability of DNS or WINS servers.

Friday, September 19, 2008

Port Protocol Network Service System Service System Service Logical Name
7 TCP Echo Simple TCP/IP Services SimpTcp
7 UDP Echo Simple TCP/IP Services SimpTcp
9 TCP Discard Simple TCP/IP Services SimpTcp
9 UDP Discard Simple TCP/IP Services SimpTcp
13 TCP Daytime Simple TCP/IP Services SimpTcp
13 UDP Daytime Simple TCP/IP Services SimpTcp
17 TCP Quotd Simple TCP/IP Services SimpTcp
17 UDP Quotd Simple TCP/IP Services SimpTcp
19 TCP Chargen Simple TCP/IP Services SimpTcp
19 UDP Chargen Simple TCP/IP Services SimpTcp
20 TCP FTP default data FTP Publishing Service MSFtpsvc
21 TCP FTP control FTP Publishing Service MSFtpsvc
21 TCP FTP control Application Layer Gateway Service ALG
23 TCP Telnet Telnet TlntSvr
25 TCP SMTP Simple Mail Transport Protocol SMTPSVC
25 UDP SMTP Simple Mail Transport Protocol SMTPSVC
25 TCP SMTP Exchange Server
25 UDP SMTP Exchange Server
42 TCP WINS Replication Windows Internet Name Service WINS
42 UDP WINS Replication Windows Internet Name Service WINS
53 TCP DNS DNS Server DNS
53 UDP DNS DNS Server DNS
53 TCP DNS Internet Connection Firewall/Internet Connection Sharing SharedAccess
53 UDP DNS Internet Connection Firewall/Internet Connection Sharing SharedAccess
67 UDP DHCP Server DHCP Server DHCPServer
67 UDP DHCP Server Internet Connection Firewall/Internet Connection Sharing SharedAccess
69 UDP TFTP Trivial FTP Daemon Service tftpd
80 TCP HTTP Windows Media Services WMServer
80 TCP HTTP World Wide Web Publishing Service W3SVC
80 TCP HTTP SharePoint Portal Server
88 TCP Kerberos Kerberos Key Distribution Center Kdc
88 UDP Kerberos Kerberos Key Distribution Center Kdc
102 TCP X.400 Microsoft Exchange MTA Stacks
110 TCP POP3 Microsoft POP3 Service POP3SVC
110 TCP POP3 Exchange Server
119 TCP NNTP Network News Transfer Protocol NntpSvc
123 UDP NTP Windows Time W32Time
123 UDP SNTP Windows Time W32Time
135 TCP RPC Message Queuing msmq
135 TCP RPC Remote Procedure Call RpcSs
135 TCP RPC Exchange Server
135 TCP RPC Certificate Services CertSvc
135 TCP RPC Cluster Service ClusSvc
135 TCP RPC Distributed File System DFS
135 TCP RPC Distributed Link Tracking TrkSvr
135 TCP RPC Distributed Transaction Coordinator MSDTC
135 TCP RPC Event Log Eventlog
135 TCP RPC Fax Service Fax
135 TCP RPC File Replication NtFrs
135 TCP RPC Local Security Authority LSASS
135 TCP RPC Remote Storage Notification Remote_Storage_User_Link
135 TCP RPC Remote Storage Server Remote_Storage_Server
135 TCP RPC Systems Management Server 2.0
135 TCP RPC Terminal Services Licensing TermServLicensing
135 TCP RPC Terminal Services Session Directory Tssdis
137 UDP NetBIOS Name Resolution Computer Browser Browser
137 UDP NetBIOS Name Resolution Server lanmanserver
137 UDP NetBIOS Name Resolution Windows Internet Name Service WINS
137 UDP NetBIOS Name Resolution Net Logon Netlogon
137 UDP NetBIOS Name Resolution Systems Management Server 2.0
138 UDP NetBIOS Datagram Service Computer Browser Browser
138 UDP NetBIOS Datagram Service Messenger Messenger
138 UDP NetBIOS Datagram Service Server lanmanserver
138 UDP NetBIOS Datagram Service Net Logon Netlogon
138 UDP NetBIOS Datagram Service Distributed File System Dfs
138 UDP NetBIOS Datagram Service Systems Management Server 2.0
138 UDP NetBIOS Datagram Service License Logging Service LicenseService
139 TCP NetBIOS Session Service Computer Browser Browser
139 TCP NetBIOS Session Service Fax Service Fax
139 TCP NetBIOS Session Service Performance Logs and Alerts SysmonLog
139 TCP NetBIOS Session Service Print Spooler Spooler
139 TCP NetBIOS Session Service Server lanmanserver
139 TCP NetBIOS Session Service Net Logon Netlogon
139 TCP NetBIOS Session Service Remote Procedure Call Locator RpcLocator
139 TCP NetBIOS Session Service Distributed File System Dfs
139 TCP NetBIOS Session Service Systems Management Server 2.0
139 TCP NetBIOS Session Service License Logging Service LicenseService
143 TCP IMAP Exchange Server
161 UDP SNMP SNMP Service SNMP
162 UDP SNMP Traps Outbound SNMP Trap Service SNMPTRAP
270 TCP MOM 2004 Microsoft Operations Manager 2004 MOM
389 TCP LDAP Server Local Security Authority LSASS
389 UDP LDAP Server Local Security Authority LSASS
389 TCP LDAP Server Distributed File System Dfs
389 UDP LDAP Server Distributed File System Dfs
443 TCP HTTPS HTTP SSL HTTPFilter
443 TCP HTTPS World Wide Web Publishing Service W3SVC
443 TCP HTTPS SharePoint Portal Server
445 TCP SMB Fax Service Fax
445 TCP SMB License Logging Service LicenseService
445 TCP SMB Print Spooler Spooler
445 TCP SMB Server lanmanserver
445 TCP SMB Remote Procedure Call Locator RpcLocator
445 TCP SMB Distributed File System Dfs
445 TCP SMB Net Logon Dfs
500 UDP IPSec ISAKMP Local Security Authority LSASS
515 TCP LPD TCP/IP Print Server LPDSVC
548 TCP File Server for Macintosh File Server for Macintosh MacFile
554 TCP RTSP Windows Media Services WMServer
563 TCP NNTP over SSL Network News Transfer Protocol NntpSvc
593 TCP RPC over HTTP Remote Procedure Call RpcSs
593 TCP RPC over HTTP Exchange Server
636 TCP LDAP SSL Local Security Authority LSASS
636 UDP LDAP SSL Local Security Authority LSASS
993 TCP IMAP over SSL Exchange Server
995 TCP POP3 over SSL Exchange Server
1270 TCP MOM-Encrypted Microsoft Operations Manager 2000 one point
1433 TCP SQL over TCP Microsoft SQL Server SQLSERVR
1433 TCP SQL over TCP MSSQL$UDDI SQLSERVR
1434 UDP SQL Probe Microsoft SQL Server SQLSERVR
1434 UDP SQL Probe MSSQL$UDDI SQLSERVR
1645 UDP Legacy RADIUS Internet Authentication Service IAS
1646 UDP Legacy RADIUS Internet Authentication Service IAS
1701 UDP L2TP Routing and Remote Access RemoteAccess
1723 TCP PPTP Routing and Remote Access RemoteAccess
1755 TCP MMS Windows Media Services WMServer
1755 UDP MMS Windows Media Services WMServer
1801 TCP MSMQ Message Queuing msmq
1801 UDP MSMQ Message Queuing msmq
1812 UDP RADIUS Authentication Internet Authentication Service IAS
1813 UDP RADIUS Accounting Internet Authentication Service IAS
1900 UDP SSDP SSDP Discovery Service SSDPRSRV
2101 TCP MSMQ-DCs Message Queuing msmq
2103 TCP MSMQ-RPC Message Queuing msmq
2105 TCP MSMQ-RPC Message Queuing msmq
2107 TCP MSMQ-Mgmt Message Queuing msmq
2393 TCP OLAP Services 7.0 SQL Server: Downlevel OLAP Client Support
2394 TCP OLAP Services 7.0 SQL Server: Downlevel OLAP Client Support
2460 UDP MS Theater Windows Media Services WMServer
2535 UDP MADCAP DHCP Server DHCPServer
2701 TCP SMS Remote Control (control) SMS Remote Control Agent
2701 UDP SMS Remote Control (control) SMS Remote Control Agent
2702 TCP SMS Remote Control (data) SMS Remote Control Agent
2702 UDP SMS Remote Control (data) SMS Remote Control Agent
2703 TCP SMS Remote Chat SMS Remote Control Agent
2703 UDP SMS Remote Chat SMS Remote Control Agent
2704 TCP SMS Remote File Transfer SMS Remote Control Agent
2704 UDP SMS Remote File Transfer SMS Remote Control Agent
2725 TCP SQL Analysis Services SQL 2000 Analysis Server
2869 TCP UPNP Universal Plug and Play Device Host UPNPHost
2869 TCP SSDP event notification SSDP Discovery Service SSDPRSRV
3268 TCP Global Catalog Server Local Security Authority LSASS
3269 TCP Global Catalog Server Local Security Authority LSASS
3343 UDP Cluster Services Cluster Service ClusSvc
3389 TCP Terminal Services NetMeeting Remote Desktop Sharing mnmsrvc
3389 TCP Terminal Services Terminal Services TermService
3527 UDP MSMQ-Ping Message Queuing msmq
4011 UDP BINL Remote Installation BINLSVC
4500 UDP NAT-T Local Security Authority LSASS
5000 TCP SSDP legacy event notification SSDP Discovery Service SSDPRSRV
5004 UDP RTP Windows Media Services WMServer
5005 UDP RTCP Windows Media Services WMServer
42424 TCP ASP.Net Session State ASP.NET State Service aspnet_state
51515 TCP MOM-Clear Microsoft Operations Manager 2000 one point