Fail2ban unban a IP or Unblock an IP

cd /var/log/

nano fail2ban.loga and search for banned IP address.

 

iptables –L –n

Get the banned type from the output and try the following:

fail2ban-client set ssh-iptables unbanip 192.168.1.101

 

ssh-iptables can be replaces by banned type like “pbx-gui”

 

By simplemsexchange Posted in VOIP

How do I register a G729 license

How do I register a G729 license

Once you have a G.729 license key, there are four primary tasks to perform  in order to install the G.729 software codec.

  1. Download and execute the ‘register’ utility to generate a valid license.

  1. Download the register utility to the root home directory of your Asterisk server. First, log in as the user “root”.
# cd /root
# wget http://downloads.digium.com/pub/register/x86-32/register

Or  (If you are using a 64 bit Operating system)

# cd /root
  1. Change the permissions of the /root/register file to r-x——.
# chmod 500 /root/register
  1. Run the register utility and follow the interactive instructions. The registration utility will prompt you for your G.729 license key.
# /root/register

Note:  Internet access is required from your Asterisk server in order to register your G.729 key for licensed use. Outgoing network traffic to TCP port 443 (SSL) must be allowed in order for the register utility to successfully communicate with Digium’s license server and complete the registration process.

  1. Download and execute the ‘benchg729’ utility to determine the optimum build.

  1. Download the benchg729 utility to the root home directory of your Asterisk server.
  1. Change the permissions of the /root/benchg729 file to r-x——.
# chmod 500 /root/benchg729
  1. Run the benchg729 utility and record the build that it recommends should be used for your platform.
#/root/benchg729
  1. Use the ‘G.729 Selector’ web utility to determine the recommended G.729 codec binary download package.

Depending upon your version of Asterisk and processor architecture, different G.729 codec binaries are recommended for the use of G.729. Digium provides a G.729 Selector web utility in order to assist with choosing the correct G.729 codec binary. The G.729 Selector web utility should be viewed with a standard web browser and may be accessed via the following URL:

http://www.digium.com/en/docs/G729/g729-download.php

User-added image

The file that the G.729 Selector web utility informs you is recommended for your platform should be the file that you use in place of the examples provided in step 4 of this section.

  1. Download and install the ‘codec_g729’ binary that is built for your platform.

  1. Download G.729 to the root home directory of your Asterisk server,
Note: This is an example, on your computer the command could be different. 

# cd /root

  1. Expand the codec_g729 archive and copy the codec_g729a.so file to the /usr/lib/asterisk/modules directory.
# tar xzvf codec_g729a-1.8.4_3.1.5-pentium4m_32.tar.gz
# cp /root/codec_g729a-1.8.4_3.1.5-pentium4m/codec_g729a.so /usr/lib/asterisk/modules/
  1. The G.729 codec binary must be loaded in order to initialize your new G.729 licensed channels.
#asterisk -rx “module load codec_g729a.so”

Or  (if the module is already loaded)

# asterisk -rx “module reload codec_g729a.so”

  1. Verify that the number of G.729 licensed channels available to Asterisk
# asterisk -rvvv
*CLI> g729 show licenses
0/0 encoders/decoders of 26 licensed channels are currently in use

General Notes

  • Multiple G.729 keys may be registered to the same Asterisk server. This will allow you to increase the total number of available G.729 licensed  channels on your Asterisk server. New G.729 keys may be registered to your Asterisk server using the same instructions provided in the Installation Procedure section. There will be an additional G.729 license file generated in the /var/lib/asterisk/licenses directory for each G.729 key that is successfully registered to your Asterisk server. It is extremely important that you follow the instructions provided in Backup Procedure section whenever a new G.729 key is successfully registered to your Asterisk server.
  • A G.729 key must be re-registered if any of the Ethernet devices in your  Asterisk server are changed, added, or removed. The unique G.729 license file which is located in your /var/lib/asterisk/licenses directory is tied to the MAC address of all the Ethernet devices installed in your system. A G.729 key can only be re-registered once without authorization from Digium. Digium must be contacted by phone in order to request authorization to have your G.729 key incremented. Digium reserves the right to deny authorization for having a G.729 key incremented.The silence suppression feature is not available using the codec_g729a.so file. Asterisk will generate output similar to “Dropping extra frame of G.729 since we already have a VAD frame at the end” if the remote end is attempting to use silence suppression with G.729. Consult with the remote end to ensure that silence suppression is not being used. You may have  problems using G.729 if the remote end attempts to use silence suppression.
  • The silence suppression feature is not available using the codec_g729a.so file. Asterisk will generate output similar to “Dropping extra frame of G.729 since we already have a VAD frame at the end” if the remote end is attempting to use silence suppression with G.729. Consult with the remote end to ensure that silence suppression is not being used. You may have problems using G.729 if the remote end attempts to use silence suppression.
  • It is not required or suggested to specify a load line in the /etc/asterisk/modules.conf for the codec_g729a.so file. Asterisk will automatically load it using the autoload option. The autoload option is  on by default.

 

By simplemsexchange Posted in VOIP

Asterisk Codecs

Go to Asterisk CLI:

# asterisk -r

Inside Asterisk CLI:

>core show codecs

>core show translation

>sip show channels
>iax2 show channels

By simplemsexchange Posted in VOIP

Installing the Free G729 Codec for Asterisk on 64 bit CENT OS

Navigate to the codecs directory:

cd /usr/lib64/asterisk/modules

Download the codec

Notice that we are in the modules directory

Rename the codec file

mv codec_g729-ast14-gcc4-glibc-pentium4.so codec_g729.so

Restart Asterisk

/etc/init.d/asterisk restart

Check your work

Connect to Asterisk

asterisk -r

Then show all of the codec translations available using the command below, and check g729 at the left, you should see that it can be translated to many other codecs on the top of the table

Machine*CLI> core show translations

         Translation times between formats (in milliseconds) for one second of data

          Source Format (Rows) Destination Format (Columns)

          g723 gsm ulaw alaw g726aal2 adpcm slin lpc10 g729 speex ilbc g726 g722

     g723    -   -    -    -        -     -    -     -    -     -    -    -    -

      gsm    -   -    2    2        2     2    1     2    3     -    -    2    -

     ulaw    -   3    -    1        2     2    1     2    3     -    -    2    -

     alaw    -   3    1    -        2     2    1     2    3     -    -    2    -

 g726aal2    -   3    2    2        -     2    1     2    3     -    -    2    -

    adpcm    -   3    2    2        2     -    1     2    3     -    -    2    -

     slin    -   2    1    1        1     1    -     1    2     -    -    1    -

    lpc10    -   3    2    2        2     2    1     -    3     -    -    2    -

     g729    -   3    2    2        2     2    1     2    -     -    -    2    -

    speex    -   -    -    -        -     -    -     -    -     -    -    -    -

     ilbc    -   -    -    -        -     -    -     -    -     -    -    -    -

     g726    -   3    2    2        2     2    1     2    3     -    -    -    -

     g722    -   -    -    -        -     -    -     -    -     -    -    -    -

Machine*CLI> quit
By simplemsexchange Posted in VOIP

A2Billing Pinless dialing

If you want to implement Pin-less Calling card solution using A2billing and Asterisk, follow the steps:

System Settings–>Global Lists –> Display All — > Search for “CID” –> change the “Enable CID” settings to Yes

CLID Enable cid_enable Yes enable the callerid authentication if this option is active the CC system will check the CID of caller .

cid_enable=YES

Now add a new caller ID from CUSTOMERS–>Caller ID also select a ID card you have created before:

a9

Now if you call to your DID, you should automatically responded by A2billing about your balance. It will not ask for PIN number.

By simplemsexchange Posted in VOIP