Foniva Contact Center Software
Asterisk Experts Support

Register to canadian do not call list

A major developement in canadian telemareting environment is about to come on September 30.

For people you want to register to such a list, here is the “How to”

Key facts for consumers

Date Modified: 2008-08-29

The National Do Not Call List (DNCL) will launch on September 30, 2008. It is designed to reduce the number of unwanted telemarketing calls and faxes Canadians receive.

1. How to register?

2. Who can still call you?

3. Market research, polls and surveys

4. Rules telemarketers must follow when they call

5. Complaints

Source :

ANI, CallerID, Spoofing

I founded a great article about some usefull definition that could help undertanding what spoofing is about

So, just what is ANI?

ANI stands for Automatic Number Identification. ANI is a service feature that transmits a directory number or Billing Telephone Number(BTN) to be obtained automatically. In other words your number is sent directly to wherever you are calling to automatically. Unlike Caller ID you can not block this feature from happening.

What is flex ANI?

Flexible ANI provides “II”(identification indicator) digits that identify the class of service of the phone you are calling from.

What is CPN?

Calling Party Number, the number used for your caller ID.

What are ANI “II” digits?

Identification Indicator digits describe the class of service of the telephone.

Some examples are:

00 "POTS"(plain old telephone service) or home phone
07 Restricted line
27 ACTS payphone
29 Prison phones
62 Cellular phones
70 Cocot Payphone

What is an ANAC?

ANAC stands for Automatic Number Anouncement Circuit. This is a phone number you can call that will ring into a circuit that anounces the ANI or CPN number you are calling from. An example of an ANAC is 800-555-1140 and 800-555-1180. When you call this number you will get an ARU(Audio Response Unit) this is the circuit that anounces your ANI/CPN. When you call 800-555-1140 or 800-555-1180 the ARU will give you this information: “The ARU ID is [id], Your line number is [trunk number], the DNIS is [DNIS number] the ANI is [II digits followed by CPN, even though the recording claims to be reading ANI]”

(These ANACs don’t work anymore, try 800-444-4444)

ARU ID: Audio Response Unit ID number, this identifies which ARU in a group of ARUs you reached.

Line number: The trunk you came in on.

DNIS: Dialed Number Identification Service — Tells you which number YOU called.(i.e. 800-555-1140 is 03123, 800-555-1180 is 03125)

ANI: II digits followed by ANI.

What is a BTN(Billing telephone number)?

BTN is a phone number for which charges are to be billed to. It is not necessarily the phone number of the line you are calling from.

What is Psuedo ANI?

Psuedo ANI or PANI is a unique non-dialable number used to route cellular calls. PANI is used by 911 operators to find the cell site and sector from which the cellphone is calling.

What is an ANI fail?

An ANI fail is when no ANI is sent. Usually the areacode of the tandem office completing the call will be sent.(i.e. if the tandem office is in 213 the ANI will be sent as 213-000-0000.)

How do ANI fails occur?

ANI fails can occur when the tandem office completing a call didn’t receive ANI from the central office originating the call. ANI fails can also be caused when ANI is intentionally not sent, this can happen by using a method called op diverting. Another way you can cause ANI fails is through the use of the AT&T long distance network. Simply dial 10-10-288-0 or dial 0 and ask your operator for AT&T. When AT&T comes on the line simply touch tone in a toll free number and the call will be completed with no ANI. Note however that this method is dependent on the AT&T center you reach, some AT&T centers still forward ANI, others send an AT&T BTN as ANI, but most AT&T centers currently don’t forward ANI.

What is op diverting?

Op diverting is a term that describes the process of intentionally causing an ANI fail by having your local operator dial the number you wish to reach. Most operator centers are not equipped to forward ANI and so they complete the call with no ANI.

What’s the difference between ANI and Caller ID?

ANI is the BTN associated with the telephone and is the direct number from where you are calling from. Caller ID is usually the BTN but occasionally can be incorrect, i.e. the main number of a business instead of the actual number being called from. Another difference in ANI is that it shows the class of service of the phone number while Caller ID just shows the name and number.
Now that you have an idea of what ANI is and how it differs from Caller ID I will explain some methods for spoofing both of them.

Source :

Asterisk-Skype merge [Interview video]

Here is a video I found on youtube regarding some details about this breaking news.

Skype and asterisk

Huge news out of Astricon 2008: Skype and Digium (News - Alert) are now collaborating, creating integration between phone systems based on Asterisk and the Skype network. Users can now treat Skype calls like any other protocol on Asterisk systems: calls can be forwarded, transferred, placed and received using Skype via an Asterisk phone system.

In other words, this means native Skype trunking on Asterisk boxes.

With Skype For Asterisk, customers gain many Skype features coupled with the capabilities of Asterisk. For example, the beta version of Skype For Asterisk allows customers to make, receive and transfer Skype calls from within Asterisk systems using their existing hardware. Users can also enable inbound calling solutions like free click-to-call from company Web sites or virtual offices, and manage Skype calls using Asterisk applications (e.g. call routing, conferencing, phone menus and voicemail).

What this means to Skype is that company has finally found a way to get into the enterprise in an easy way — by partnering with Digium/Asterisk which has great traction with developers, resellers, carriers, SMBs and more. Expect more enterprise use of Skype and as this happens, Skype should see more revenue from business users.

For Digium, this partnership allows the company to leapfrog larger telecom players and gives the company major momentum, making it a magnet for more leading-edge deals. I wouldn’t be surprised ifMicrosoft ( News - Alert) approaches the company for a UC partnership soon if they aren’t talking already.

For the communications community this collaboration means more flexibility and lower cost calling for consumers and businesses worldwide. Finally, Skype users should be able to call companies over native Skype and for free. This news could become a major game changer if companies integrate Skype click-to-call functionality on their Web sites.

Skype for Asterisk gives the open source platforms from Skype and Digium an advantage over companies like Cisco, Avaya and Nortel, whose solutions require an external trunking gateway to communicate with the Skype community.

This also likely will be huge news for telecom markets, causing the price of phone calls to drop substantially when they’re placed from Skype devices using Asterisk open sourcePBX ( News - Alert) software.

One other point: the Skype gateway market may now become based on Asterisk appliances/software. This means there could be more interoperability between the Skype network and SIP/other standards.

asterisk cli improvement

Command Line Interface for asterisk pbx is usefull to debug and track what is happening or happenned

on you asterisk server.

However, this can become a whole mess if you have multiple calls going to different sections of your dialplan. Multiple clis cannot do differents and separate things. If you set debug level to 0, every connected client will be set to 0 then.

Back in 2007, a discussion on digium board about cli filtering that will allow users to follow one specific channel or extension.

They were a patch but I don’t think this feature has been released.

Here are cool and usefull stuff asterisk cli needs to include :

- a connected cli informations should be specific to that connection. Multiple different clis should have different verbose and debug levels, sip debug …

- an asterisk command should allow us to filter what we want to see. Filter can be on:

* channel name (eg : core cli filter SIP/testuser*)

* on module. Only show logs from that module (eg: core cli filter

* on a section or context or extension of the dialplan (eg: core cli filter 5050@default). So, if you want to see all the channels going through a specific critical path of your dialplan, you will start seeing debug informations as soon as a channel reach that extension in the dialplan.

* on a specific caller id or caller id pattern

asterisk chain calling (follow me)

Between all cool features coming with asterisk 1.4, app_followme is a nice one.

It allows you to send the same call to multiple consecutive destinations and end

up in a voicemail if none of the destinations answers.

-= Info about application ‘FollowMe’ =-
Find-Me/Follow-Me application

This application performs Find-Me/Follow-Me functionality for the caller
as defined in the profile matching the <followmeid> parameter in
followme.conf. If the specified <followmeid> profile doesn’t exist in
followme.conf, execution will be returned to the dialplan and call
execution will continue at the next priority.

s    - Playback the incoming status message prior to starting the follow-me step(s)
a    - Record the caller’s name so it can be announced to the callee on each step
n    - Playback the unreachable status message if we’ve run out of steps to reach the
or the callee has elected not to be reachable.
Returns -1 on hangup

As you can see, you can use this feature and provide the called user followme-id as predefined in followme.conf.

This feature can be use if you want an inbound call to ring to the desktop, then ring to the cell phone if not answered, then goes back to the voicemail.


Asterisk GUI Interface

Digium released a new asterisk GUI interface (2.0)

You can have screen shoots here.

Here is the associate press release:

If you really don’t like command lines and configuration files, this may be for you.

Use the power of local channels

When you run :

Type        Description                              Devicestate  Indications  Transfer
———-  ———–                              ———–  ———–  ——–
Gtalk       Gtalk Channel Driver                     no           yes          no
IAX2        Inter Asterisk eXchange Driver (Ver 2)   yes          yes          yes
Zap         Zapata Telephony Driver w/PRI            no           yes          no
SIP         Session Initiation Protocol (SIP)        yes          yes          yes
Phone       Standard Linux Telephony API Driver      no           yes          no
MGCP        Media Gateway Control Protocol (MGCP)    yes          yes          no
Console     OSS Console Channel Driver               no           yes          no
Skinny      Skinny Client Control Protocol (Skinny)  no           yes          no
Agent       Call Agent Proxy Channel                 yes          yes          no
Local       Local Proxy Channel Driver               yes          yes          no

You can see here the Local channel type on the list.

This channel purpose is preatty simple. When you dial SIP/ressource, or IAX2/ressource,

asterisk will try to reach the sip or iax end point.

Local channels will send a channel that will goes through the dialplan and execute whatever is at the given extension.

Syntax : Dial(Local/extension@context)

Of course, you can add any options to the dial

Since nobody needs to answer any phone when using the Local channel, you can use it to query asterisk, send outbound calls to an extension that will dial an outbound number.

Example : Click to call

Let’s say you have a click to call application where from your website where somebody needs to click and a call will be place to a given extension 3000 and play the sounds file /var/lib/asterisk/sounds/my-click-message.gsm

- From your webserver, write a file in /var/spool/asterisk/outgoing with the folowing content

Dial: Local/3000@default

Application : Playback

Data : my-click-message

This means, asterisk will create and launch the channel Local/3000@default so will send a Local channel to extension 3000 in default context. And if that call answers, asterisk will execute the application Playback with the message my-click-message.

Now, you just need to configure your dialplan (extensions.conf) to tell asterisk, what he has to do when a call comes in at extension 3000 in default context.


exten => 3000,1,Noop( Call comes in to extension ${EXTEN} )

exten => 3000,n,Dial(Zap/g1/4180000000) ; outbound dial to number 4180000000

exten => 3000,n,Hangup

Count and limit number of calls under asterisk

Under asterisk, from your dialplan or an agi script you canput your calls (that has the same purpose)

in the same group.

This can be done using the GROUP* functions under asterisk.

- With GROUP() you can retrieve or set a group for the current channel

- With GROUP_COUNT() you can retrieve the total of live channel in that group

- With GROUP_LIST, you will get a list of group where the current channel is. So you can set put the same channel in multiple group to classify them.

- With GROUP_MATCH_COUNT, you can retrieve the number of live channels in that group matching the specifed regular expression.

Example :

A nice application for this is, if you have multiple inbound DIDs that reach a same T1 or E1 and want to limit calls to DID 2120000000 to 15 for example. Your dialplan should go like this :

exten => 212000000,1,Noop(Received call to extension ${EXTEN})

exten => 212000000,n,GROUP(${EXTEN}) ; send all calls coming here to group 2120000000

exten => 2120000000,n,GotoIf($[ ${GROUP_COUNT()} > 15 ]?maxreached) ; make your check

exten => 2120000000,n, ……. ; Normal call flow

exten => 2120000000,n,Hangup

exten => 2120000000,n(maxreached),Congestion ; Here there is too many calls - You could play a message as well

exten => 2120000000,n,Busy

Help on functions

Gets or sets the channel group.
Gets or sets the channel group.

Counts the number of channels in the specified group
Calculates the group count for the specified group, or uses the
channel’s current group if not specifed (and non-empty).

Counts the number of channels in the groups matching the specified pattern
Calculates the group count for all groups that match the specified pattern.
Uses standard regular expression matching (see regex(7)).

Gets a list of the groups set on a channel.
Gets a list of the groups set on a channel.

Configure asterisk 1.4 and odbc/mysql, ubuntu

Since asterisk 1.4, and mysql new licence,

cdr_mysql has been disabled from asterisk default source code.

However, you can still use ODBC to connect to mysql and update your cdr for example.

You will get here a great article about steps to follow to do so

Basicly, you need to install libmyodbc and unixodbc  packages.

Then edit /etc/odbcinst.ini

Description     = MySQL driver
Driver          = /usr/lib/odbc/
Setup           = /usr/lib/odbc/
CPTimeout       =
CPReuse         =

Then create an ODBC resource in /etc/odbc.ini

Description     = Asterisk MySQL ODBC
Driver          = MySQL
Socket          = /var/run/mysqld/mysqld.sock
Server          = localhost
User            = user
Password        = password
Database        = asterisk
Option          = 3
#Port           =

Now, you need to configure asterisk to use those ressources :

Edit /etc/asterisk/res_odbc.conf

enabled => yes
dsn => MySQL-asterisk
username => user
password => password
pre-connect => yes

and /etc/asterisk/cdr_odbc.conf

table=cdr               ;”cdr” is default table name
usegmtime=no             ; set to “yes” to log in GMT

Run again

make menuselect

from asterisk source directories.

Go to “Call Details Recording”

and select cdr_odbc

If, you cannot select cdr_odbc, this means that libmyodbc devel package is not install.

You may need to download the source and compile them.

To do so :

- download or the latest one

- extract it

- run :


make install

You should see header files like in /usr/include/sql.h

Return to asterisk source directory and run

./configure –with-odbc=/usr/

make menuselect

Now, you should be able to select cdr_odbc

When done, just run ‘make install’ and will be compile.

Hope this help.

Next Page →

Our sponsors

Asterisk Experts Support