我在beplay欺骗被骗了10000怎么办

Forget 10,000 Hours — Instead, Aim for 10 Minutes
It’s hard to believe, but it’s been nearly five years since the 10,000-Hour Rule . Last week, as if to officially mark the anniversary, more than three hundred coaches, players, general managers, and talent-development experts from around the world gathered at the
conference in New York. Among this crowd, you might expect to find people singing the praises of the 10,000-Hour Rule.
You’d be wrong.
A significant number disliked it, because they saw the rule creating a mindless culture of hour-counting. They saw sports federations building programs around the metric, using it as the sole measure of progress.
“It’s absolutely nuts,” the head of one nation’s soccer federation told me. “Coaches are tracking practice hours and the athletes are clocking in and out with time cards like they’re working on an assembly line. There’s no ownership, no creativity.”
The science behind the 10,000-Hour rule has been , and rightly so, because talent is more complex than any one measure. For example, how do you calibrate the impact of Warren Buffett’s childhood paper route on his temperament and business skills? How do you count the hours the young Keith Richards spent listening to blues records and falling in love with them?
The real issue here, however, is that the the 10,000-Hour rule is not really about quantity. It’s about the power of sharp, focused, high-quality practice. It’s about the massive learning differences created by intense efforts within highly engaging practice environments. We see this in the habits of high-performing groups, many of whom build their skills through a combination of short, sharp sessions and lots of restorative rest.
For example, at La Masia, the training academy that has produced the majority of Barcelona’s world-beating soccer team, the schedule calls for organized training a mere 70 minutes per day — a figure that most U.S. travel soccer coaches would scoff at as being insufficient.
But here’s the thing: it’s a world-class 70 minutes: a razor-sharp, full-tilt, meticulously planned session with far more content and engagement than any mundane, exhausting three-hour practice.
The other benefit of this approach is that it frees the learners to spend time on their own. Real learning doesn’t happen just thro most of it happens in the off hours, when you’re fooling around, inventing games, competing, experimenting, mimicking, grappling with problems and inventing solutions. When you’re wholly engaged in the art of simple, intense play.
So perhaps a solution is to ignore the 10,000-Hour Rule and instead embrace the 10-Minute Rule. Which has three elements:
1) Focus: pick out a target skill — a single chunk you want to work on.
2) Super-high intensity
3) Rest: only do it when you’re fresh. If you’re exhausted, quit.
In other words: don’t approach practice like a factory worker logging hours. Instead, think like an opportunist. Be an entrepreneur.
This entry was posted
on Friday, June 7th, 2013 at 9:09 am.
You can follow any responses to this entry through the
You can , or
from your own site.
(20 votes, average: 4.00 out of 5)
Loading...
Share This
Comment On This
Pre-Order The Culture Code
Buy The Little Book Of Talent
Buy the Talent Code
Recent Posts
In The News
Growing Skill: How It Works
Growing Skill: How It Feels
Contact Daniel CoyleFrom Wikipedia, the free encyclopedia
This article does not
any . Please help
by . Unsourced material may be challenged and . (November 2015) ()
A game of Dice 10,000 in progress. A player has set the three "3" dice aside and has three left to reroll.
Dice 10,000 (or Dix Mille, 6-Dice, 10,000 Dice, Ten Grand) is the name of a family , very similar to . It also goes by other names, including Zilch, Zilchers, Foo, Boxcar, Bogus and Crap Out.
The game requires six standard dice and a pencil and paper for scoring. Each player starts out "off the table" with a score of zero. Players collect points during their turn, and either add those points to their cumulative score, or continue rolling with the risk of losing all points accumulated that turn if a scoring combination is not rolled.
To begin a turn, if the player is "off the table," they roll all six dice. If the roll scores any points, they may set aside each scoring die or group of dice they want to claim points from, and either roll all remaining dice, hoping to score additional points, or take the points already accumulated this turn and pass play to the next player. Most versions of the game require a minimum score of 300 points in each turn to bank the score and pass, otherwise the player must continue rolling. If the player rolls multiple scoring combinations, only one is required to be taken with each roll, all other dice may be rerolled if desired. If all six dice score points in one or more rolls of a single turn, the player rolls all six dice again and continues to score additional combinations, known as a sweep. If at any time a roll scores no points, the player forfeits all points scored that turn (commonly called "zilch" or "crapping out"), and play is passed to the next player. If a player gets zilch three turns in a row they may suffer a 500-point penalty or lose all their points previously accumulated, depending on the several rules used.
In order to get "on the table," a player must score at least 1000 points in a single turn (but not necessarily in one roll). Once a player is "on the table," they are on for the duration of the game. For a player who is "on the table," they may start a turn by either rolling all six dice as described above, or picking up the unused dice from the last player's turn. In this case, instead of starting this turn's scoring from zero, scoring starts from the score taken by the last player.
Example: Player 1 stops her turn with 700 points, and opts to not roll her remaining two dice. She adds 700 to her score, and it is now Player 2's turn. Player 2 may pick up those two dice, and if he scores anything with them, he adds those points to 700, as his score, and may bank or continue rolling as normal. Player 2 may instead opt to start over with all six dice, and start his own scoring from zero.
These are the base methods of scoring:
Single fives are worth 50 points
Single ones are worth 100 points
Three of a kind are worth 100 points times the number rolled, except for three ones which are worth 1000 points
If four, five, or six of a kind are rolled, each additional die is worth double the three of a kind score
This makes the highest possible score in a single roll 8000 for six ones (1000 for three ones, doubled 3 times. (the fourth one doubles the 1000 to 2000, the fifth one doubles the 2000 to 4000, and the sixth one doubles the 4000 to 8000).
A straight from 1 to 6 is worth 1500 points. If a player fails to roll a straight they may make one attempt to complete the straight. If the desired number(s) does not turn up on the next roll that round is a "crap out" even if there are scoring dice on the table i.e. 1's or 5's.
Three pairs is worth 500 points. For instance 2+2, 4+4, 5+5. This rule does not count if you roll a quadruple and a pair 2+2, 2+2, 6+6.
If a player fails to roll a three of a kind they may make one attempt to complete the three of a kind. If the desired number(s) does not turn up on the next roll that round is a "crap out" even if there are scoring dice on the table i.e. 1's or 5's.
Dice are scored at the time they are rolled, so three or more of a kind must be rolled simultaneously, and dice from later rolls do not "stack" for the higher score.
Players have the options to call what they roll or call chance. if a player calls a roll and is successful that player will receive an addition 50 points to add to that score. If the player "craps-out" that he loses the 50 points.
Example: Player 1 rolls all six dice, and chooses to score three fours for 400 points. She rolls the remaining three dice for a 2, 4, 5; the additional 4 does not multiply the previous three of a kind, and she can only score 50 points for the lone 5. If she rolls two more 5's with the remaining dice, they will only score 50 points each, and do not form a three of a kind with the other 5.
Straight 1- 6
Three Pairs
The first player to score over 10,000 points temporarily becomes the winner, and each other player gets one more turn to top that player's score. Whoever ends with the highest score over 10,000 wins the game.
In one variation, players must score exactly 10,000 without going over. In the event that a player goes over, the score for that turn is lost. In this variation, if the 10,000 is hit, that player wins immediately without giving the other players a chance to roll. However, if the winner leaves at least one die then the next player may 'roll off the score'.
(see article for more information on scoring variations and probabilities)
: Hidden categories:Set up your own PBX with Asterisk
Set up your own PBX with Asterisk
Introduction
Important: To log stuff to the console, either use Verbose(), or use NoOp()
but the latter will only work if you set &verbosity& to at least 3
(in the console, type &set verbose 3&).
Why choose Asterisk to build a PBX over other open-source solutions?
&There are several SIP implementations that are OSS, but they are primarily
what are known as &call proxies& instead of more full-featured PBX
applications. This means that they function only to connect two endpoints together,
and are basically just large, fast, directory servers. Examples of SIP Proxies
are ser and Vocal.&
Is Asterisk the only PBX that can rewrite CID name on the fly? Check
Which environment to choose?
To set up Asterisk, several solutions are available:
Install a bare Linux distro, and install the whole shebang from source
code (recommended)
Install a bare Linux distribution that supports RPM or other packagers, and install the
required components through this package in binary form. Red Hat RPM packages for Asterisk and the driver
modules can be obtained from
&Engineered by Digium in conjunction with rPath,
includes all the Linux components necessary to run, debug and build
Asterisk, and only those components. You no longer have to worry about kernel
versions and package dependencies. Unlike other Linux distributions used to
deploy Asterisk, no unnecessary components that might compromise security or
performance are included.&
is also a bundled version of Linux and Asterisk, but optimized for small
format hardware platforms
(Important: You might want to
at whether you want to use a commercial Asterisk) Use the
distribution (previously
)&that aims to do the same thing as Pound Key. Ideal for newbies,
but requires a second host since, on purpose, it must be managed through
a web interface but doesn't have X (Lynx could do the job, I guess). I don't
like A@H because it hides the internals (hence, not a good tool to learn
how Asterisk works), and installs a lot of stuff that is probably useless
for a home solution (SugarCRM, etc.)
How to connect Asterisk to the POTS/PSTN (ie. regular, analog phone line)
There are two solutions:
A stand-alone PSTN gateway like the Linksys 3102 or the
A PCI card (don't use the : Get quality hardware from brands like ,
Which branch to use?
As of Feb 2012, four branches are available: 1.4, 1.6, 1.8, and 10. I don't
know of a good source to know what the major changes are in each branch and
make an informed choice before upgrading, but some information are available
in UPGRADE*.txt files in
along with the
Installing from packages
Here's how to install Asterisk on Ubuntu from packages.
Asterisk and dahdi
apt-get install asterisk
apt-get install asterisk-config
Installing &asterisk& takes care of installing configuration files
Sound files
Those files are encoded in GSM.
apt-get install asterisk-sounds-main
apt-get install asterisk-sounds-extra
Localized Sound Files
Voice prompts are available for a few languages:
asterisk-prompt-fr-armelle - French voice prompts for Asterisk by Armelle
Desjardins
asterisk-prompt-fr-proformatique - French voice prompts for Asterisk
Post-install tweaking
The following changes included some needed to use Dahdi, ie. with a PCI interface.
cd /etc/asterisk
cp modules.conf modules.conf.orig
vi modules:noload =& pbx_ael.sonoload =& pbx_lua.sonoload
=& app_cdr.sonoload =& app_fax.sonoload =& app_festival.sonoload
=& app_followme.sonoload =& app_forkcdr.sonoload =& app_mp3.sonoload
=& app_meetme.sonoload =& res_ldap.confnoload =& res_phoneprov.so
mv features.conf features.conf.orig
mv users.conf users.conf.orig
mv sip.conf sip.conf.orig
mv extensions.conf extension.conf.orig
mv say.conf say.conf.orig
vi chan_dahdi.conf:language=fr
vi cdr.conf: enable=no
cd /etc/dahdi
vi modules
vi system.conf
vi etc/modprobe.d/dahdi.conf: options wctdm opermode=FRANCE&
/etc/init.d/asterisk restart
Basic Asterisk server with Dahdi from source
Dependencies
Update the host with the latest of installed apps + kernel/kernel-dev.
If the kernel was updated, reboot to use the latest version
Download the dependencies:ncurses&ncurses-developenssl
openssl-devellibssl-devzlib&zlib-devel zlib1g-devbison&bison-devellibnewt-devinitrd-toolsprocpswgetlibusb-dev
(to avoid &waitfor_xpds: Missing astribank_is_starting&)For
CentOS:yum install kernel-devel kernel bison openssl-devel gcc gcc-c++
libtermcap libtermcap-devel ncurses ncurses-devel zlib zlib-devel newt newt-devel
a Debian/Ubuntu server, I've seen this recommended:apt-get install
build-essential libncurses5-dev libcurl3-dev libvorbis-dev libspeex-dev
unixodbc unixodbc-dev libiksemel-dev linux-headers-`uname -r` libnewt-dev
cd /usr/src
xzvf asterisk-1.4-current.tar.gz
cd asterisk-1.4.????
./configure
make menuselect (UI OK from Putty, BAD from SecureCRT)
& Core Sound Packages, Music On Hold File Packages, and Extras Sound
make install
make samples
make config
Asterisk add-on's
Includes MySQL support for call detail records and MP3 support for MOH.
cd /usr/src
tar xzvf asterisk-addons-1.4-current.tar.gz
cd asterisk-addons-1.4.11
./configure
make install
make samples
lspci -vv (Check that the hardware is detected)
cd /usr/src
cd dahdi-linux-complete-2.3.0.1+2.3.0
make install
make config
(Not needed) vi /etc/modprobe.conf
vi /etc/modprobe.d/dahdi.conf (&You should place any module parameters
for your DAHDI modules here&)options wctdm opermode=FRANCE&
(optional) vi /etc/modprobe.d/blacklist (&blacklist all the drivers
by default in order to ensure that /etc/init.d/dahdi installs them in the
correct order so that the spans are ordered consistently.&)&
Comment out modules you do NOT want to blacklist
Add &blacklist netjet&
Reboot to get rid of the NetJet module that is loaded instead of the
Wctdm module, and run &lsmod | grep -i netjet& to check that netjet/ISDN are gone&
vi /etc/dahdi/moduleswctdm&
vi /etc/dahdi/system.confloadzone = frdefaultzone = frfxsks
= 1echocanceller=mg2,1
vi /etc/asterisk/indications.conf[general]country=fr[fr]description
= France; Reference: http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdfringcadence
= ; Dialtone can also be 440+330dial = 440busy = 440/500,0/500ring
= 440/0; CONGESTION - not specifiedcongestion = 440/250,0/250callwait
= 440/300,0/10000; DIALRECALL - not specifieddialrecall = !350+440/100,!0/100,!350+440/100,!0/100,!350+440/100,!0/100,350+440;
RECORDTONE - not specifiedrecord = /15000info = !950/330,!00/330stutter
= !440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,!440/100,!0/100,440
vi /etc/asterisk/chan_dahdi.conf[trunkgroups][channels]signalling
= fxs_ksusecallerid = yeshidecallerid = nocallwaiting = yescallwaitingcallerid
= yesthreewaycalling = yestransfer = yescanpark = yescancallforward
= yescallreturn = yesechocancel = yesechocancelwhenbridged =
yesrelaxdtmf = yesrxgain = 0.0txgain = 0.0busydetect=yes;busycount=6answeronpolarityswitch=yeshanguponpolarityswitch=yescontext
= from-pstnchannel =& 1
vi extensions.conf[from-pstn]exten =& s,1,NoOp(Incoming
/etc/init.d/dahdi start, tail /var/log/messages, and check LED on PCI
Restart Asterisk
In case of trouble, try to put the card into another slot, or even in a difference
computer. Take a look at OpenVox's .
If you get &driver should be 'wctdm' but is actually 'netjet'&
when starting dahdi:&
dahdi_cfg -vv to configure
dahdi_hardware to check hardware
dahdi_scan to display channels
CLI& dahdi show status
Troubleshooting
# lspci -vv
# dahdi_hardware
# dahdi_cfg -vv
SIP accounts
Create SIP accounts and a basic dialplan:cd /etc/asteriskmkdir
origmv sip.conf ./origmv extensions.conf ./origvim sip.conf:[general]port
= 5060bindaddr = 0.0.0.0context = othersdisallow=allallow=ulawallow=alawallow=gsmnat=noqualify=yeshost=dynamic[2000]type=friendcontext=my-phonessecret=1234[2001]type=friendcontext=my-phonessecret=1234vim
extensions.conf:[others][my-phones]exten =& 2000,1,Dial(SIP/2000)exten
=& 2001,1,Dial(SIP/2001)exten =& s,1,Verbose(Yes!)exten
=& 9999,1,Goto(s,1)
Launch Asterisk, and connect to its console:safe_asteriskasterisk
-r (&quit& to exit)
Configure two SIP phones to connect to Asterisk with the above accounts,
and use one phone to ring the other
Once installed, Asterisk files can be located in the following directories:
/etc/asterisk/
/etc/zaptel.conf (not part of Asterisk, so located outside /etc/asterisk/)
/usr/lib/asterisk/modules/
/var/lib/asterisk/
/var/spool/asterisk/
/var/log/asterisk/
Modules are located under /lib/modules/'uname -r'/misc (eg. wcfxo.o, zaptel.o,
ztdummy.o, etc.)
By default, Asterisk loads a lot of stuff, and must be told explicitely not
to load them through /etc/asterisk/modules.conf, using eg. noload =& pbx_ael.so.
Modules usually live under /usr/lib/asterisk/modules/.
IAX accounts
Compiling Asterisk for Windows
Install Cygwin. You may need to manually install/upgrade tools like
autoconf, automake etc depending on your Cygwin installation
Install build essentials in Cygwin
Download Asterisk source (I used 1.4.x) and unzip it using tar (You
may need to install tar manually as it is missing in some Cygwin default
installations. Don't use windows unzip for as it will create some abnormal
character in source and will make unexpected compile time errors)
Run bootstrap it will report any missing or lower version libs, prerequisite
You manually need to download and compile termcap, ncurses
Run configure
Make menuselect and disable all non-required modules as it will save
to resolve lot of not needed dependencies
Resolve any missing reported by make
After successful make run make install
Once make install okey you can run asterisk on Cygwin console and also
directly run by double clicking on asterisk.exe in c:/Cygwin/usr/sbin/.
Once you have compiled it you can copy asterisk.exe to any other system not
having Cygwin installed but you have to care about following:
You must have to create required directories structure like Cygwin on
system drive.
You must need to copy required Cygwin DLLs to new systems \windows\system32\
folder. You can identify required DLLs by trying to run asterisk.exe and
it will report missing DLLs one by one.
I did just for my experiment and fun and was able to make successful SIP
calls using static files configuration. However I suggest to use SIPx, Yate
or FreeSWITCH if you want to stick with windows as that have native windows
ports and have all required features you need in a PABX or VoIP switch.
One more thing previously there was a project named as AstWin which was maintaining
asterisk's port to windows and providing an installable package of Asterisk
for windows. I am not aware about current state of project &but, I have
installation package of Asterisk for windows version 1.2. If anyone need it
contact me direct at email
I will send the software as attachment.
Tips to compile Asterisk
Since Asterisk is often updated, packages found on the Net are usually a
bit stale, and it's better to learn how to compile it yourself. Here are some
tips I gathered:
Set a hostname, eg. &sip& or && (but
make sure it can actually be resolved)
Install Linux, including development tools (GCC, ncurses, openssl, zlib,
bison, kernel sources)
Libpri is only needed if you have a PCI ISDN card
Zaptel is only needed if you have a PCI Analog card, ie. to connect
the PC to an analog telephone line through an FXO port
Check that your motherboard supports at least PCI 2.2, and that it lets
you assign an IRQ to a given PCI slot. These cards generate huge amounts
of interrupts during use, and any conflict with other devices will result
in jittery voice and overall poor performance ()Look in /proc/interrupts to ensure
that wcfxo has an IRQ all to itself. If it is sharing an IRQ, move the card
to a different PCI slot and see if that resolves the conflict. Read
Once the board is installed, boot up, and run &dmesg& and
&lspci -v& to check that Linux detected it
The Zapata channel module, chan_zap.so, is used by to communicate with
the Linux kernel, where the drivers for the hardware are loaded. The Zaptel
interface is a kernel loadable module that presents an abstraction layer between
the hardware drivers (eg. wctdm, wcfxo) and the Zapata module in Asterisk (ie.
chan_zap.so -& Zaptel module /dev/zap -& wcfxo -& FXO card.) While Asterisk
itself compiles on a variety of platforms, the Zaptel drivers are Linux-specific
are written to interface directly with the Linux kernel
Newer distros rely on devfs and the udev daemon to create device nodes
dynamically. If yours uses those tools, check its documentation on how to
add Zaptel (eg. editing /etc/udev/rules.d/50-udev.rules)
cat /proc/zaptel/*
ztcfg reads /etc/zaptel.conf to configure channel(s)
to load zaptel, you just need to edit zaptel.conf, load wcfxo, and run ztcfg
: ztcfg -vv
wcfxo and zaptel modules: The order of execution of these commands is important, because voice channels
are numbered in the same order their interface cards are enabled. For instance,
if you had two
X100P cards installed or a TDM400P with two FXO modules, you would have two
logical voice channels. To check that those two modules were loaded successfully,
run &lsmod | grep (zaptel|wcfxo)& (or wctdm instead of wcfxo).zaptel drivers are installed in &/lib/modules/'uname -r'/misc (eg.
tor2.o torisa.o wcfxo.o wcfxs.o wcfxsusb.o wct1xxp.o wcusb.o zaptel.o ztd-eth.o
ztdummy.o ztdynamic.o).
&One other package you may want to install is . While
Asterisk comes with many sound prompts in the main source distribution, the
asterisk-sounds package will give you even more. If you would like to expand
the number of professionally recorded prompts for use with your Asterisk system,
this package is essential.&
The asterisk-addons package contains code to allow the storage of Call Detail
Records (CDRs) to a MySQL database and to natively play MP3s, as well as an
interpreter for loading Perl code into memory for the life of an Asterisk process.
Programs are placed into asterisk-addons when there are licensing issues preventing
them from being implemented directly into the Asterisk source code, or when
they are not yet ready for primetime.
/var/log/asterisk/messages
&zap show channels& in the Asterisk console
Reloading after making changes: zaptel.conf: run &ztcfg
-vv&zapata.conf: &reload& from the Asterisk console (or use asterisk
-rx &reload& to execute the command directly)sip.conf and iax.conf: &reload chan_sip.so& and &reload
chan_iax2.so& from the Asterisk consoleextensions.conf: &reload& from the Asterisk console
If you have problems
using SIP phones, make sure that your SIP client is using the G.711 codec (either
alaw or ulaw) as that is a codec that is known to work with Asterisk
&The s extension will only be selected when a call enters a context
without a target extension defined. Imagine a ZAP channel (regular phone line),
it rings, asterisk answers but it has no idea what the target extension will
be so it throws it into s. &Why doesn't this work with SIP? When a SIP
packet comes in, it has the target extension in the packet so instead of sending
it to s it tries to send the call to the target extension. If the target extension
can't be matched it sends a not found back to the SIP phone, basically telling
you you dialed a wrong number.&
In extensions.conf, add NoOp() in context to know where it fails
Optimization can be done through the Zaptel and Asterisk configuration
files (eg. CONFIG_ZAPTEL_MMX is not AMD-friendly, etc.)
Before recompiling Asterisk, remove all files under /usr/lib/asterisk/modules
Trimming it down
Remove unneeded modules: /etc/asterisk/modules.conf
There are different types of modules:
applications
In sip.conf, make use of templates:
[common](!)
context=my-phones
type=friend
host=dynamic
qualify=yes
[9000](common)
secret=1234
[9001](common)
secret=1234
Add this kind of stuff in voicemail.conf:[general]format
= wav[default]2000 =& 4711,Joe Bloggs,joeb@megacorp.biz2001
=& 0815,Darlene Doe
Update extensions.conf[others][my-phones]exten =&
2000,1,Dial(SIP/2000,20)exten =& 2000,2,VoiceMail(2000,u)exten
=& 2001,1,Dial(SIP/2001,20)exten =& 2001,2,VoiceMail(2001,u)exten
=& 2999,1,VoiceMailMain(${CALLERID(num)},s)
In the console, type &reload&
Adding an FXO card with Zaptel
Insert the PCI card, boot up, and type 'lspci -v' to check that Linux
did detect it (eg. &Communication controller: Tiger Jet Network Inc.
Tiger3XX Modem/ISDN interface&). It should not share an IRQ with another
Download the Linux source code and headers for the kernel version you
are currently using (cat /proc/version)
Download and untar the Zaptel source code:wget tar
xzvf zaptel-1.4-current.tar.gz
Compile the Zaptel module:cd zaptel-1.4.5.1make
clean./configure# make menuselectmakemake installmake config
Edit /etc/default/zaptel to match your hardware
Create a user &asterisk& to run Zaptel, or you'll get &udevd : lookup_user : specified user 'asterisk' unknown&
when rebooting:useradd asteriskedit /etc/password and
/etc/shadow to disable login for this system account
Create Zaptel's configuration file /etc/zaptel.conf:fxsks=1loadzone=frdefaultzone=frAlternatively
use the script genzaptelconf to generate a zaptel.conf that should work
with your system
Activate Zaptel: ztcfg -vv
Edit /etc/asterisk/zapata.conf:[channels]language=frcontext=my-phones
Must match section in extensions.confusecallerid=yeshidecallerid=noimmediate=nosignalling=fxs_ksechocancel=yesechocancelwhenbridged=yesgroup=1channel=&1
Must match channel # in zaptel.conf
/etc/rc.d/init.d/zaptel start
lsmod if you want to check that the modules were indeed loaded
If an analog line is plugged into the card and the card was configured with
ztcfg, zttool should say OK; Otherwise, it should &Unconfigured&
Recompile and reinstall Asterisk
Edit extensions.conf so that Asterisk knows what to do when a call comes
in from the PSTN on the FXO card (context=my-phones above).Here's
an example that just plays back what you say in the phone (Note: Must add
other stuff for a complete extensions.conf)[my-phones]; incoming
calls from the FXO port are directed to this context from zapata.conf;Asterisk's
parser is so brain-dead that you can't use a comma, even with quotes;BAD
exten =& s,1,Verbose(&Hello, World!&)exten
=& s,1,Verbose(Hello World!)
libpri even when not using an ISDN board? &Libpri provides the libraries
required for using Primary Rate ISDN (PRI) trunks, as well as a number of other
telephony interfaces. Even if we do not have a PRI line at this time, it is
a good idea to install it, as it will not create any conflicts. Parts of the
Asterisk code depend on the libraries included in the libpri package. Therefore,
any time we install libpri, we should recompile Asterisk.&
If our system is configured to start the Zaptel hardware at boot time, we
can accomplish this by running:
$ /etc/init.d/zaptel stop
$ /etc/init.d/zaptel start
If, however, we elected not to start Zaptel interfaces at boot time, we can
implement our changes as we go by running:
$ ztcfg -vvv
Remember: Changes to the file will not take effect until we have zaptel.confrestarted
the drivers.
Zapata.conf is read by Asterisk. Therefore, to read changes made to this
file, we can issue a reload in the Asterisk console. Zaptel will NOT have to
be restarted to apply any changes we make in zapata.conf.
To test the card, run &zttest -c 10&
NEEDED? Load modules wcfxo (zaptel loaded automagically?)
NEEDED? echo &ztdummy& && /etc/modules
: &Zaptel &ticks& once per millisecond (1000 times per
second). On each tick every active zaptel channel reads and 8 bytes of data.
Asterisk also uses this for timing, through a zaptel pseudo channel it opens.
However, not all PBX systems are connected to a telephony provider via a
T1 or similar connection. With an analog connection you are not synced to the
other party. And some systems don't have Zaptel hardware at all. Even a digital
card may be used for other uses or is simply not connected to a provider. Zaptel
cards are also capable of providing timing from a clock on card. Cheap x100P
clone cards are sometimes used for that pupose.
If all the above fail, you can use the module ztdummy to provide timing alone
without needing any zaptel hardware. It will work with most systems and kernels.
You can check the zaptel timing source with zttest, which is a small utility
that is included with zaptel. It runs in cycles. In each such cycle it tries
to read 8192 bytes, and sees how long it takes. If zaptel is not loaded or you
don't have the device files, it will fail immedietly. If you lack a timing device
it will hang forever in the first cycle. Eitherwise it will just give you in
each cycle the percent of how close it was. Also try running it with the option
-v for a verbose output.&
NEEDED? modprobe ztdummy (modprobe = insmod, rmmod)
Do you actually have any zaptel kernel modules loaded ?
how to unload/reload zaptel? rmmod?
ubuntu*CLI& zap show channels
No such command 'zap show' (type 'help' for help)
zap show status
The main method to configure Zaptel devices is using the utility *ztcfg*.
ztcfg reads data from the configuration file /etc/zaptel.conf , figures out
what configuration to send to channels, and send it.
is ztdummy automatically loaded when loading either zaptel or wcfxo?
if ztcfg -vv = 0 channels configured. -& /etc/zaptel.conf
Asterisk behind a NAT firewall
Since Asterisk (1.8) still doesn't really support STUN, at the very least,
you must open a range of UDP ports on your firewall and forward them to Asterisk
to match RTP ports in rtp.conf.
In addition, if you intend to receive calls other than from a VoIP provider,
you must also forward UDP5060 which is the standard SIP port. The reason you
don't need this to register/receive calls to/from your VoIP provider, is that
in this case, Asterisk is just an SIP client and the use of &qualify&
will keep the port open.
Here's how to configure sip.conf when Asterisk and an XLite client when both are located on a private
LAN and need to make/receive calls from the Internet:
;Basic protection
context=invalid&
;Default for clientsbindport=5060&
bindaddr=0.0.0.0
srvlookup=yes
;Your public IP address
externip=1.2.3.4
externrefresh=10
fromdomain=&
;rewrite source IP address in SDP packets
nat=yeslocalnet=192.168.0.0/24
;keep firewall ports open
qualify=yes
;RTP packets must all through Asterisk server
; Asterisk by default tries to redirect
canreinvite=no&
dtmfmode=auto
disallow=all
allow=ulaw
allow=alaw
register =& mylogin:
[VoIPProvider]
qualify=yes
;username=200
type=friend
secret=test
qualify=yes
host=dynamic
context=myinternal
By Sean Walberg
Testing Asterisk and NAT
IP used in REGISTER
When the Asterisk server and the SIP clients are all located on the same
LAN (with non-routable IP's), it appears that SIP clients are smart enough to
send their LAN IP instead of the WAN IP even when set to use STUN when REGISTERing
to the SIP server (Asterisk).
Opening SIP and RTP ports on NAT
Can Asterisk do it? If yes, 1.4, 1.6, 1.8?
Direct media mode and NAT
Can RTP packets flow directly between SIP clients when there are on either
side of the NAT (ie. one in the LAN, one on the Net)? If yes, are some features
How many ports does RTP need? 1 for RTP and 1 for RTSP?
How to use a port other than UDP 5060 on the router?
To avoid breaking attempts while still allowing remote SIP clients to REGISTER
and remote SIP clients/servers to INVITE: Create SRV record in DNS?
How to scan UDP ports from the Net?
How to monitor hacking attemps?
/tmp/asterisk/log/event_log is empty
/var/log/messages?
Hung up from remote Ekiga: XLite doesn't detect call ended
OK when XLite hangs up.
OK when ZoIPer hangs up.
-& Ekiga issue.
Using an Atcom AG-188N PSTN Gateway
Adding a Linksys 3102
VoIP gateway
Using a GSM cellphone with Asterisk
is an open-source
Unix application that uses the Universal Software Radio Peripheral ()
to present a GSM air interface to standard GSM handset and uses the Asterisk
software PBX to connect calls. The combination of the ubiquitous GSM air interface
with VoIP backhaul could form the basis of a new type of cellular network that
could be deployed and operated at substantially lower cost than existing technologies
in greenfields in the developing world.
In plain language, we are working on a new kind of cellular network that
can be installed and operated at about 1/10 the cost of current technologies,
but that will still be compatible with most of the handsets that are already
in the market. This technology can also be used in private network applications
(wireless PBX, rapid deployment, etc.) at much lower cost and complexity than
conventional GSM.&
Zaptel and call progress
Ideally, you should connect Asterisk to the POTS through either an ISDN line
or SIP + VoIP provider, since, unlike analog on lines, they separate data and
signaling, which makes eg.
very easy.
If you must use an analog line, professional-grade,
are usually more reliable than entry-level Digium knock-offs and
the Zaptel/Dahdi driver + .
If you're lucky, your telco reverses line polarity or drops battery (&kewlstart&,
an extension of &loopstart&) to
indicate that the remote end has answered/hung up. To indicate a hangup, the
&loopstart& solution can reassert the dial-tone or give a busy/fast
busy signal.
Otherwise, if you are relying on Zaptel+PCI or the Linksys 3102 gateway,
Asterisk may not report that the callee is either BUSY or has picked up the
And even if Asterisk/Zaptel does detect an answer, automated calls can't
tell if the remote party is a human being or an answering machine.
So the only reliable solution if you need to automate calls (ie. &robocall&)
is to loop through a voice message asking the callee to hit any key on their
dialpad to confirm that they did answer the call, and use a time-out if no DTMF
has been typed within a certain time-frame.
As for detecting that the callee has hung up, try &busydetect=yes&
in zapata.conf or chan_dahdi.conf.
Telco provides answer/hangup signal
If you are lucky, your telco uses the easier method of signalling answer/hangup,
through polarity reversal or open loop disconnect a.k.a. . In this case, edit zapata.conf thusly:
;tells chan_zap to monitor that line continuously for eg. pre-ring CID
;polarityevents=no
;how long (ms) to ignore Polarity Switch events after we answer a call
;polarityonanswerdelay=1
answeronpolarityswitch = yes
hanguponpolarityswitch = yes
If you are semi-lucky, you live in the US and Zaptel can be told to analyze
callprogress=yes
progzone=us
If none of the above applies, while Zaptel can detect a BUSY signal (which
should be sent when the callee is already online or has hung up your call),
it can't detect an offhook. Strangely enough,
is only used to play tones, not analyze them.
ChanIsAvail
When called with the name of the channel,
returns the status in the AVAILORIGCHAN variable (AVAILSTATUS isn't reliable).
Here, we dial out from the CLI, and check the variable while the line is engaged.
First, extensions.conf where the call will be handled:
;Loop until Zap/1 is available or INDEX & 10
exten =& 1111,1,Set(INDEX=0)
exten =& 1111,n,While(1)
exten =& 1111,n,ChanIsAvail(Zap/1)
exten =& 1111,n,GotoIf($[&${AVAILORIGCHAN}& != &&
| ${INDEX} & 10]?exit)
exten =& 1111,n,Wait(5)
exten =& 1111,n,Set(INDEX=$[${INDEX} + 1])
exten =& 1111,n,EndWhile()
;how did we exit loop?
exten =& 1111,n(exit),GotoIf($[&${AVAILORIGCHAN}& = &&]?na:ok)
exten =& 1111,n(na),NoOp(Channel still N.A.)
exten =& 1111,n,Goto(end)
exten =& 1111,n(ok),NoOp(Channel OK)
;give */Zaptel time to recover
exten =& 1111,n,Wait(5)
exten =& 1111,n,Hangup()
exten =& 1111,n(end),Hangup
Other ways to check the content of AVAILORIGCHAN:
exten =& 7777,n,GotoIf($[!${ISNULL(${AVAILORIGCHAN})}]?available:not_available)
exten =& 7777,n,GotoIf($[${EXISTS(${AVAILORIGCHAN})}]?available:not_available)
Next, place a call from the CLI:
originate Zap/1/5551234 extension 7777@internal
An alternative way to check if a Zaptel port is available and wait until
the channel is available:
exten =& 7777,1,Set(INDEX=0)
;j = Add 101 to priority to jump when N.A.
exten =& 7777,n(check),ChanIsAvail(Zap/1,j)
exten =& 7777,n,NoOp(Channel is available)
exten =& 7777,n,Hangup
exten =& ,NoOp(Channel N.A.)
exten =& 7777,n,Wait(5)
exten =& 7777,n,Set(INDEX=$[${INDEX} + 1])
exten =& 7777,n,GotoIf($[${INDEX} & 10]?check)
exten =& 7777,n,NoOp(Giving up)
exten =& 7777,n,Hangup
Note that ChanIsAvail simply says if the port is available: In case you're
trying to dial a remote end through a landline, the remote line might (still)
Also note that DEVICE_STATE (1.6, backported to 1.4) doesn't work with FXO
;Dahdi doesn't support DEVICE_STATE
;CLI& core show channeltypes
exten =& 2222,1,NoOp(${DEVICE_STATE(Dahdi/1)})
exten =& 2222,n,Hangup()
Play message and wait for confirmation
As a work-around, instead of just using Wait() and start playing a message
blindly, you can play a message asking the callee to hit a DTFM to confirm that
they're ready to proceed:
[callback]
exten =& s,1,Wait(2)
exten =& s,n,Answer
;expects 1 key,4 tries, wait 5 seconds between tries
exten =& s,n(read),Read(key,please-type,1,,4,5)
exten =& s,n,GotoIf($[${LEN(${key})} == 0]?end)
;callee is alive
exten =& s,n,Playback(auth-thankyou)
exten =& s,n(end),Wait(1)
exten =& s,n,Hangup()
Theoretically, using ,
it should be possible to use a While loop to force Asterisk to pause until the
callee has answered, but it doesn't work:
;Down, Rsrvd, OffHook, Dialing, Ring, Ringing, Up, Busy, Dialing Offhook,
Pre-ring, Unknown
exten =& start,n,Set(INDEX=0)
exten =& start,n,While($[&${CHANNEL(state)}& != &OffHook&
& ${INDEX} & 10])
exten =& start,n,NoOp(Channel still ringing: ${CHANNEL(state)})
exten =& start,n,Wait(1)
exten =& start,n,Set(INDEX=$[${INDEX} + 1])
exten =& start,n,EndWhile()
Detecting a remote BUSY
When calling out, this is how to detect that the remote line is already engaged:
Make a call automatically through a callfile
Use Dial() manually and read the
variable to check how the call went. The problem with Dial() is that it's
a blocking application, so it won't work if you want to perform tasks after
the callee has answered. (try g/G)
A callfile simply dials out and jumps to the context:
[callback]
exten =& start,1,Answer()
exten =& start,n,Playback(beep)
exten =& start,n,Hangup
;0 - Failed (not busy or congested)
;1 - Hung up
;3 - Ring timeout
;8 - Congestion
exten =& failed,1,NoOp(Reason call file failed is ${REASON})
An alternative:
[callback]
exten =& start,1,GotoIf($[ &${DIALSTATUS}&=&BUSY&]?end)
exten =& start,n,Wait(2)
exten =& start,n,Answer()
exten =& start,n,Playback(some-important-message)
exten =& start,n(end),HangUp
exten =& 123,1,Dial(Zap/1/)
;just hangs up and doesn't proceed?
exten =& 123,n,NoOp(Called ended with ${DIALSTATUS})
exten =& 123,n,Hangup()
exten =& h,1,NoOp(Called ended with ${DIALSTATUS})
Another example about the DIALSTATUS variable:
exten =& s,n,Dial(Zap/1/5551234)
exten =& s,n,Goto(s-${DIALSTATUS},1)
exten =& s-ANSWER,1,Hangup
exten =& s-CANCEL,1,Hangup
exten =& s-NOANSWER,1,Hangup
exten =& s-BUSY,1,BOnly works with SIP calls
exten =& s-CHANUNAVAIL,1,Verbose(Not available)
exten =& s-CONGESTION,1,Congestion
exten =& _s-.,1,Congestion
exten =& s-,1,Congestion
RetryDialing
Doesn't work if remote end is busy: Simply hangs up and
ends there:
;No difference
exten =& start,1,Progress()
exten =& start,n,RetryDial(pls-hold-while-try,10,3,Zap/1/)
exten =& start,n,NoOp(Result is ${DIALSTATUS})
exten =& h,1,NoOp(In h, result is ${DIALSTATUS}
;no difference
exten =& failed,1,NoOp(Reason call file failed is ${REASON})
[from_fxo]
exten =& s,1,Wait(2)
exten =& s,n,Hangup
exten =& h,1,Goto(redial,start,1)
As a test, here's what to put in extensions.conf...
[callback]
exten =& start,1,Answer()
exten =& start,n,Wait(1)
exten =& start,n,Playback(tt-monkeysintro)
exten =& start,n,Wait(1)
exten =& start,n,Hangup
... and here's how to make an outgoing call and check that Asterisk doesn't
jump to the [callback] context until the call has been answered:
CLI& originate SIP/voip-out/5551234 extension start@callbackCLI&
originate Zap/1/5551234 extension start@callback&
Note that &originate& isn't very reliable, and sometimes drops
a call for no reason.
Files common to Zaptel and Dahdi
/etc/asterisk/indications.conf (; call progress tones played to the callers with Playtones()
once they are within Asterisk)
CHECK /etc/modprobe.conf
Files specific to Zaptel
/etc/zaptel.conf
/etc/asterisk/zapata.conf
Files specific to Dahdi
/etc/dahdi/modules
/etc/dahdi/system.conf
/etc/asterisk/chan_dahdi.conf
modprobe.conf
options wctdm opermode=FRANCE
;options wctdm opermode=FRANCE debug=1
To actually see data in /var/log/messages, you must also edit /etc/asterisk/logger.conf.
asterisk/indications.conf
country=fr
description = France
zaptel.conf
loadzone = fr
defaultzone=fr
asterisk/zapata.conf
First, include your locale, eg.
language=fr
Next, tell Asterisk which signaling to use to match the one used in zaptel.conf:
The better way to detect that the remote end has been disconnected is when
your telco performs a temporary polarity switch, ie. kewlstart/fxsks:
answeronpolarityswitch=yes
hanguponpolarityswitch=yes
;tells chan_zap to monitor that line continuously for eg. pre-ring CID
;polarityevents=yes
;how long (ms) to ignore Polarity Switch events after we answer a call
;polarityonanswerdelay=1
If this doesn't work, it could mean that your telco indicates a hangup with
a loop disonnect, a.k.a. Calling Party Control. I didn't find any settings in
any file to enable this.
If this is not available either from your telco, it means that your telco
plays tones to indicate call progress (eg. Disconnection Tone to signal a hangup).
Apparently, the only setting available in zapata.conf is to detect a BUSY signal:
busydetect=yes
busycount=4
I guess Asterisk knows how to handle other tone through the parameters set
in other files above.
&progzone& parameter: &This defines the timing and frequencies
for call progress detection, which are buried in the sources in asterisk/dsp.c.
This is DIFFERENT than the call progress timing defined in zaptel/zonedata.c
and in /etc/asterisk/indications.conf, and so far only options you can use (defined
in dsp.c) are us, ca, br, cr and uk.&
&callprogress& parameter: &Highly experimental and can easily
detect false answers, so don't count on it being very accurate. Also, it is
currently configured only for standard U.S. phone tones&. Enabling this
with non-US telcos may prevent Zaptel from working.
&flash& parameter: &used only with (non-PRI) T1 lines&.
After editing zapata.conf, remember to stop Asterisk/restart Zaptel/start
Asterisk, or type the following in the CLI: module reload chan_zap.so
dahdi/modules
dahdi/system.conf
asterisk/chan_dahdi.conf
Sometimes, &originate& doesn't actually ring a remote number
ip04*CLI& originate Zap/1/5551234 extension 8888@internal
Try with x86 Linux and check
Why dont call files trigger the &failed& extension?
If calling out through Zaptel+PCI or the Linksys 3102, try with a VoIP provider.
Tips & tricks
of the different call-progress tones, including ,
International line settings can be found at .
Closing channel
If you need to hang up a Zaptel channel in the Asterisk console: &soft
hangup Zap/1-1& or &soft hangup Dahdi/1-1&
Reloading Zaptel/Dahdi
If you changed a channel's configuration in zapata.conf/chan_dahdi.conf,
type &module reload chan_zap.so& or &module reload chan_dahdi.so&,
respectively.
Wait() in h
If you need to wait in the &h& extension, Wait() won't work. A
work-around is to use system(/bin/sleep 10) to use the system's command instead.
Repeating a phone number
Here's how to have Asterisk repeat a phone number the French way:
Put localized sound files in /var/lib/asterisk/sounds/fr/
Edit /etc/asterisk/asterisk.conf thusly:[options];Layout
requires Asterisk 1.4+languageprefix = yes
Edit /etc/asterisk/say.conf:[general]; method for playing numbers
and dates; old - using asterisk core function; new - using this
configuration filemode=new...[fr](date-base,digit-base);BAD
_[n]um:0. =& num:${SAY:1}_[n]um:X =& digits/${SAY}_[n]um:1X
=& digits/${SAY}_[n]um:[2-9]0 =& &digits/${SAY}_[n]um:[2-6]1
=& digits/${SAY:0:1}0, vm-and, digits/${SAY:1}_[n]um:71 =& digits/60,
vm-and, num:1${SAY:1}_[n]um:7X =& digits/60, num:1${SAY:1}_[n]um:9X
=& digits/80, num:1${SAY:1}_[n]um:[2-9][1-9] =& &digits/${SAY:0:1}0,
num:${SAY:1}_[n]um:100 =& digits/hundred_[n]um:1XX =& digits/hundred,
num:${SAY:1}_[n]um:[2-9]00 =& num:${SAY:0:1}, digits/hundred_[n]um:[2-9]XX
=& num:${SAY:0:1}, digits/hundred, num:${SAY:1}_[n]um:1000 =&
digits/thousand_[n]um:1XXX =& digits/thousand, num:${SAY:1}_[n]um:[2-9]000
=& num:${SAY:0:1}, digits/thousand_[n]um:[2-9]XXX =& num:${SAY:0:1},
digits/thousand, num:${SAY:1}_[n]um:XX000 =& num:${SAY:0:2}, digits/thousand_[n]um:XXXXX
=& num:${SAY:0:2}, digits/thousand, num:${SAY:2}_[n]um:XXX000 =&
num:${SAY:0:3}, digits/thousand_[n]um:XXXXXX =& num:${SAY:0:3}, digits/thousand,
num:${SAY:3}_[n]um:1000000 =& num:${SAY:0:1}, digits/million_[n]um:1XXXXXX
=& num:${SAY:0:1}, digits/million, num:${SAY:1}_[n]um:[2-9]000000
=& num:${SAY:0:1}, digits/million_[n]um:[2-9]XXXXXX =& num:${SAY:0:1},
digits/million, num:${SAY:1}_[n]um:XX000000 =& num:${SAY:0:2}, digits/million_[n]um:XXXXXXXX
=& num:${SAY:0:2}, digits/million, num:${SAY:2}_[n]um:XXX000000 =&
num:${SAY:0:3}, digits/million_[n]um:XXXXXXXXX =& num:${SAY:0:3},
digits/million, num:${SAY:3}_datetime::. =& date:AdBY 'digits/at'
H 'hours' M 'perc':${SAY}_date::. =& date:AdBY:${SAY}_time::.
=& date:H 'hours' M 'perc':${SAY};800 numbers_pho[n]e:08XXXXXXXX
=& num:${SAY:0:1}, num:${SAY:1:3},num:${SAY:4:2}, num:${SAY:6:2},num:${SAY:8:2}_pho[n]e:XXXX
=& num:${SAY:0:2}, num:${SAY:2:2}_pho[n]e:0[1-9]XXXXXXXX =&
num:${SAY:0:1}, num:${SAY:1:1}, num:${SAY:2:2}, num:${SAY:4:2}, num:${SAY:6:2},
num:${SAY:8:2}_pho[n]e:. =& digit:${SAY}&
&Edit /etc/asterisk/extensions.conf:exten =& 1000,1,Playback(phone:,say)
Recording a message
Asterisk only supports WAV files encoded in 16-bit, 8000Hz, mono. Here's
how to call Asterisk from XLite, and record a message in low- and high-quality
formats ():
[context_for_my_handset]
exten =& 101,1,Playback(vm-intro)
exten =& 101,n,Record(maingreeting.wav)
exten =& 101,n,Wait(2)
exten =& 101,n,Playback(maingreeting)
exten =& 101,n,Hangup
Alternatively, you can record a message in a more compact format such as
uLaw, which is a better option if this is the codec that is likely to be used
for incoming calls, as this will spare Asterisk from having to convert messages
to another format:
[context_for_my_handset]
exten =& 101,1,Playback(vm-intro)
exten =& 101,n,Record(maingreeting.ulaw)
exten =& 101,n,Wait(2)
exten =& 101,n,Playback(maingreeting)
exten =& 101,n,Hangup
CLI& core show translation
Improving sound quality
To keep jitter/latency as low as possible, make sure the host running Asterisk
has enough hardware (CPU, RAM, network), only runs the minimal software required,
and has as few peripherals connected as possible.
Make sure all the routers within your control are configured to use QoS so
that VoIP traffic is favored over non-isochronous traffic.
Wireshark is a useful tool, as it can trace VoIP traffic and compute delay.
VAD (Voice Activity Detection)
Make sure all devices going through Asterisk use the same codec, so that
Asterisk doesn't have to perform transcoding.
How to get sound infos on a live conversation?
show translation
sip show channels
sip show channel &Call ID&
I'd recommend you get a hardware timer card for Asterisk. This will greatly
improve your audio quality since your test hardware is not powerful enough for
the software based timer to do it's job properly
Sangoma VoiceTime USB stick
Level too low
Choppy sound
Provided the issue occurs even with a single call, ie. bandwidth is plenty,
check the latency and round-trip time (RTT) between the two end-points.
Echo issues
Echo, heard either at your end or the remote end, can have two causes:
Impedance mismatch between the device (the IP-to-PSTN gateway), the
local loop to the telco, and the remote hybrid that turns this two-wire
cable into a four-wire cable before the voice signal is digitized by the
telco.This mismatch causes some of your voice to be sent back to
you: The delay is too short for echo to be noticeable when using analog
equipments (so you'll just think of this as side-tone), but noticeable because
of the delay that VoIP adds to the process (analog-to-digital conversion
in the IP phone, DAC before setting your voice to the telco through the
POTS line, and back.)Solution: If the device that you use to connect
to the POTS has some impedance settings, play with this setting. Also check
its in/out gain settings. If it still fails, try its own echo canceller,
if any, or a software echo canceller like the
if your IP phone or IP PBX supports it
Cheap or badly-configured telephone where the voice coming from the
earpiece is picked up by the microphone, causing a loop-back.Things
to try: Lower the incoming volume on your IP phone so the microphone doesn't
pick up the signal coming from the earpiece. Try a different IP phone. Use
More information:
By David Mandelstam
By Alexey Frunze
by Scott Kurtz
Writing dialplans
The meat of Asterisk resides in extensions.conf, ie. the dialplan.
Application vs. function?
&An application is something that performs an action on a channel (such
as playing a sound prompt, gathering DTMF input, putting the call into a call
queue, etc.). A function, on the other hand, is used to get or set values, and
doesn't directly manipulate the channel. &These values *might* have something
to do with the channel (such as is the case with the CDR function), but don't
necessarily have to (such as is the case with the CUT and LEN functions).
You could also think of it as the difference between a procedure and a function.
&A procedure does something and returns nothing. &A function may or
may not be doing something, but its primary function is to return a value. &Unlike
other languages, in Asterisk, the return value of a function may not be directly
ignored (i.e. you HAVE to get it, even if you do nothing with it). Of course,
setting a dialplan function completely ruins this nice dichotomy. ;-)&
&An application is a &command& executed by a dialplan priority,
such as Record, Verbose, TrySystem, etc. A function needs to be evaluated inside
${ } and returns a string value that is substitued in place of the ${ }.&
&In addition to dialplan applications, which have been part of Asterisk almost
from the very beginning, Asterisk also supports functions as of Asterisk 1.2.
This is part of a long-standing effort to make Asterisk behave more like a programming
environment.
In contrast to applications, functions may not be called directly.
Instead, they are called inside applications and return a value, or -- in a
departure from the classical definition of a function -- they may even be written
to using the application Set() (see the section called 揝et()

我要回帖

更多关于 beplay假网 的文章

 

随机推荐