• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER SIP softphone
Back to Tutorials

6.1.2.106. Zapateller (dialplan application)

1. Zapateller - this application allows you to generate a special information tone(SIT), which is used to block telemarketers.

NOTE: This application is valid for Asterisk version 1.0.9 and above.

 


Syntax:

Zapateller(options)

 


List with the possible options

answer - with this option the line will be answered and then the tone will be played.
nocallerid - The SIT tone will be played only if there is no Caller ID received on the line.


You can use the two options separately or you can use them together. If you are going to use the two possible options together, you have to separate them by the "|" character.

 


Purpose and usage

According to the documentation of the Asterisk The purpose of this application is to block the telemarketers by playing a special sound called Special Information Tone(SIT). However, you can use Zapateller, even if you want just to play this sound in other situations.

 


Prerequisites

To use this application you need a working Asterisk PBX with registered users in iax.conf, sip.conf or mgcp.conf(It depends on which protocol you would like to use) and made extensions.

To see how the application works we recommend to use our IAX softphone Idefisk. You can download it from here. Please also read our tutorial to learn how to configure it to work with Asterisk PBX.

 


Asterisk PBX configurations

NOTE: This is only an example of what for you can use this application. Of course you can use it and for other things.

We need two registered users in iax.conf file. This is because we are going to use the IAX2 protocol. If you want to use other protocol such as SIP or MGCP, you have to do the configurations below respectively in sip.conf or mgcp.conf.

iaxtwousersspecial.jpg

So, we have registered the users user1 and user2.

Type=friend means that this user can make and receive calls. Host=dynamic means that the IP is not static but dynamic through a DHCP server. Allow=all means that the line which this user will use, could support all audio codecs. Context=test - this shows that this user is working with the extensions in this context of the configuration file extensions.conf. Callerid=user1 <10112> means that the Caller ID of this user will be user1 and the Caller ID Number of this user will be 10112. You have to write this in the shown way, because there are no separate options for Caller ID Number and Caller ID.This is the way to assign a Caller ID Number to a specific user. The settings for the user user2 means the same. The Caller ID of this user will be user2 and the Caller ID Number of this user will be 10012.

extzapateller.jpg

On the picture above you can see our extensions.conf file.

We will use the Zapateller application with no arguments. The reason is that we have Answer application at the beginning of our [test] context and there is no point to use the answer option with Zapateller. Also we will use the variable ${CALLERIDNUM} to filter to incoming calls. As you know, the only way to set a Caller ID Number is to use the callerid option in iax.conf file. So there is no point to use the nocallerid option of the Zapateller application, because we are sure that a Caller ID will be received on the channel.

In our example when somebody dials 1010, the call will be answered by the Answer application. The next executed extension will be the one which contains the GoToIf application. It will filter the incoming calls by Caller ID. To this purpose we have to use the ${CALLERIDNUM} variable. It contains the caller’s number.

We will check, whether the first three digits of the Caller Number are 100. To achieve this you have to write as argument, in the brackets of the GoToIf application, the following: $["${CALLERIDNUM:0:3}" = "100"]?3:5.

If the digits are 100, then the call will be redirected to the extension with priority 3. This extension contains the Zapateller application and thanks to it the caller will hear the SIT tone. Then the line will be hung up by the hangup application. It is important to make this extension, with the hangup application, otherwise there will be no point from all previous extensions and the caller will be allowed to dial the user ivan through the IAX2 channel.

If the first three digits are different from 100, then the call will be redirected to the extension with priority 5. This one will dial the user ivan through the IAX2 channel, thanks to the Dial application.

In order to be sure, that the Asterisk PBX will hang up the line after the conversation is over, it is always a good idea to make an extension for hanging up.

 


2. Screenshots of what you can see on your Idefisk and on the CLI of the Asterisk PBX

1) Screenshot for user1 with number 10112
clizapa1.jpg

2) Screenshots for user2 with number 10012
clizapa.jpg


 


3. Additional information

For more information about extensions.conf you can check here.
For more information about iax.conf you can check here.

This application is tested with our IAX softphone Idefisk. You can download it from here. For more information about this softphone please read our tutorial.

If you would like to test this application with the SIP channel you can read our tutorials about the SIP Softphones to learn how to configure them to work with Asterisk PBX

 

 
Add Comment
Name:
Email:
Comment:
In order to prevent automatic posting on our website, we kindly request you to type in the number you see in the picture below.
Image Verification:
 

Latest Headlines:

  • T.38 faxing with Zoiper 2.15 is now easier than ever
    section: voip software
  • Asterisk 1.4.21 Released
    section: Asterisk
  • Asterisk 1.4.20 Released
    section: Asterisk
  • Asterisk 1.4.20-rc2 Released
    section: Asterisk
  • Asterisk 1.4.20-rc1 Now Available
    section: Asterisk
  • News Archives (older news)

Latest Tutorials:

  • VMAuthenticate (dialplan application)
    added 01/Mar/2008 15:57
  • Siptronic ST-530
    added 06/Nov/2007 17:57
  • Siemens C455 IP hardphone
    added 05/Nov/2007 10:24
  • Zoiper
    added 22/Oct/2007 17:53
  • Grandstream GXP-2020
    added 15/Oct/2007 18:17

Latest Comments:

  • Hi, For Airtel PRI the Conf. shold be...
    tutorial: libpri_chan_zap[work in progress]
  • Hi, For Airtel PRI the Conf. shold be...
    tutorial: libpri_chan_zap[work in progress]
  • Because it is a soft phone. It is a phon...
    tutorial: SNOM360 SIP softphone
  • any one can tell me if I can use phone ...
    tutorial: X-Lite - SIP softphone
  • Just like so many else, I\'m having a pr...
    tutorial: Asterisk Voicemail
 
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™