<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.astripedia.org/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.astripedia.org/index.php?title=Special:Newpages&amp;feed=atom</id>
		<title>AstriPedia - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.astripedia.org/index.php?title=Special:Newpages&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Special:Newpages"/>
		<updated>2010-09-10T06:50:16Z</updated>
		<subtitle>From AstriPedia</subtitle>
		<generator>MediaWiki 1.6.10</generator>

	<entry>
		<id>http://wiki.astripedia.org/index.php/U-Z</id>
		<title>U-Z</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/U-Z"/>
				<updated>2007-09-12T07:20:23Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* WaitForSilence */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Index U-Z of Asterisk Applications&lt;br /&gt;
==UnpauseQueueMember==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Unpauses a queue member&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
UnpauseQueueMember([queuename]|interface[|options]):&lt;br /&gt;
&lt;br /&gt;
Unpauses (resumes calls to) a queue member. This is the counterpart to PauseQueueMember and operates exactly the same way, except it unpauses instead of pausing the given interface. The option string may contain zero or more of the following characters:&lt;br /&gt;
&lt;br /&gt;
       'j' -- jump to +101 priority when appropriate.&lt;br /&gt;
  This application sets the following channel variable upon completion:&lt;br /&gt;
     UPQMSTATUS       The status of the attempt to unpause a queue&lt;br /&gt;
                      member as a text string, one of&lt;br /&gt;
            UNPAUSED | NOTFOUND&lt;br /&gt;
 Example: UnpauseQueueMember(|SIP/3000)&lt;br /&gt;
&lt;br /&gt;
==UserEvent==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Send an arbitrary event to the manager interface&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
UserEvent(eventname[|body]):&lt;br /&gt;
&lt;br /&gt;
Sends an arbitrary event to the manager interface, with an optional body representing additional&lt;br /&gt;
arguments.  The format of the event will be:&lt;br /&gt;
    Event: UserEvent&amp;lt;specified event name&amp;gt;&lt;br /&gt;
    Channel: &amp;lt;channel name&amp;gt;&lt;br /&gt;
    Uniqueid: &amp;lt;call uniqueid&amp;gt;&lt;br /&gt;
    [body]&lt;br /&gt;
If the body is not specified, only Event, Channel, and Uniqueid fields&lt;br /&gt;
will be present.  Returns 0.&lt;br /&gt;
&lt;br /&gt;
==Verbose==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Send arbitrary text to verbose output&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Verbose([&amp;lt;level&amp;gt;|]&amp;lt;message&amp;gt;) level must be an integer value.  If not specified, defaults to 0.&lt;br /&gt;
&lt;br /&gt;
==VMAuthenticate==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Authenticate with Voicemail passwords&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
VMAuthenticate([mailbox][@context][|options]):&lt;br /&gt;
&lt;br /&gt;
This application behaves the same way as the Authenticate application, but the passwords are taken from&lt;br /&gt;
voicemail.conf. If the mailbox is specified, only that mailbox's password will be considered valid. If the mailbox is not specified, the channel variable AUTH_MAILBOX will be set with the authenticated mailbox.&lt;br /&gt;
Options: s - Skip playing the initial prompts.&lt;br /&gt;
&lt;br /&gt;
==VoiceMail==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Leave a Voicemail message&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
VoiceMail(mailbox[@context][&amp;amp;mailbox[@context]][...][|options]):&lt;br /&gt;
&lt;br /&gt;
This application allows the calling party to leave a message for the specified list of mailboxes. When multiple mailboxes are specified, the greeting will be taken from the first mailbox specified. Dialplan execution will stop if the specified mailbox does not exist.&lt;br /&gt;
&lt;br /&gt;
The Voicemail application will exit if any of the following DTMF digits are received:&lt;br /&gt;
    0 - Jump to the 'o' extension in the current dialplan context.&lt;br /&gt;
    * - Jump to the 'a' extension in the current dialplan context.&lt;br /&gt;
  This application will set the following channel variable upon completion:&lt;br /&gt;
    VMSTATUS - This indicates the status of the execution of the VoiceMail&lt;br /&gt;
               application. The possible values are:&lt;br /&gt;
               SUCCESS | USEREXIT | FAILED&lt;br /&gt;
  Options:&lt;br /&gt;
    b    - Play the 'busy' greeting to the calling party.&lt;br /&gt;
    g(#) - Use the specified amount of gain when recording the voicemail&lt;br /&gt;
           message. The units are whole-number decibels (dB).&lt;br /&gt;
    s    - Skip the playback of instructions for leaving a message to the&lt;br /&gt;
           calling party.&lt;br /&gt;
    u    - Play the 'unavailable greeting.&lt;br /&gt;
    j    - Jump to priority n+101 if the mailbox is not found or some other&lt;br /&gt;
           error occurs.&lt;br /&gt;
&lt;br /&gt;
==VoiceMailMain==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Check Voicemail messages&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
VoiceMailMain([mailbox][@context][|options]):&lt;br /&gt;
&lt;br /&gt;
This application allows the calling party to check voicemail messages. A specific mailbox, and optional&lt;br /&gt;
corresponding context, may be specified. If a mailbox is not provided, the calling party will be prompted to enter one. If a context is not specified, the 'default' context will be used.&lt;br /&gt;
&lt;br /&gt;
  Options:&lt;br /&gt;
    p    - Consider the mailbox parameter as a prefix to the mailbox that&lt;br /&gt;
           is entered by the caller.&lt;br /&gt;
    g(#) - Use the specified amount of gain when recording a voicemail&lt;br /&gt;
           message. The units are whole-number decibels (dB).&lt;br /&gt;
    s    - Skip checking the passcode for the mailbox.&lt;br /&gt;
&lt;br /&gt;
==Wait==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Waits for some time&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Wait(seconds):&lt;br /&gt;
&lt;br /&gt;
This application waits for a specified number of seconds. Then, dialplan execution will continue at the next priority. Note that the seconds can be passed with fractions of a second. For example, '1.5' will ask the application to wait for 1.5 seconds.&lt;br /&gt;
&lt;br /&gt;
==WaitExten==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Waits for an extension to be entered&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
WaitExten([seconds][|options]):&lt;br /&gt;
&lt;br /&gt;
This application waits for the user to enter a new extension for a specified number of seconds.&lt;br /&gt;
Note that the seconds can be passed with fractions of a second. For example, '1.5' will ask the application to wait for 1.5 seconds.&lt;br /&gt;
  Options:&lt;br /&gt;
    m[(x)] - Provide music on hold to the caller while waiting for an extension.&lt;br /&gt;
             Optionally, specify the class for music on hold within parenthesis.&lt;br /&gt;
&lt;br /&gt;
==WaitForRing==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Wait for Ring Application&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
WaitForRing(timeout) Returns 0 after waiting at least timeout seconds. and only after the next ring has completed.  Returns 0 on success or -1 on hangup&lt;br /&gt;
&lt;br /&gt;
==WaitForSilence==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Waits for a specified amount of silence&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
WaitForSilence(x[|y]) Wait for Silence:&lt;br /&gt;
&lt;br /&gt;
Waits for up to 'x' milliseconds of silence, 'y' times or 1 if omitted Set the channel variable WAITSTATUS with to one of these values:SILENCE - if silence of x ms was detectedTIMEOUT - if silence of x ms was not detected.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  - WaitForSilence(500|2) will wait for 1/2 second of silence, twice&lt;br /&gt;
  - WaitForSilence(1000) will wait for 1 second of silence, once&lt;br /&gt;
&lt;br /&gt;
==WaitMusicOnHold==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Wait, playing Music On Hold&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
WaitMusicOnHold(delay):&lt;br /&gt;
&lt;br /&gt;
Plays hold music specified number of seconds. Returns 0 when done, or -1 on hangup. If no hold music is available, the delay will still occur with no sound.&lt;br /&gt;
&lt;br /&gt;
==While==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Start A While Loop&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
While(&amp;lt;expr&amp;gt;) Start a While Loop. Execution will return to this point when&lt;br /&gt;
&lt;br /&gt;
EndWhile is called until expr is no longer true.&lt;br /&gt;
&lt;br /&gt;
==Zapateller==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Block telemarketers with SIT&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Zapateller(options):&lt;br /&gt;
&lt;br /&gt;
Generates special information tone to block telemarketers from calling you.&amp;lt;br&amp;gt;&lt;br /&gt;
Options is a pipe-delimited list of options.&amp;lt;br&amp;gt;&lt;br /&gt;
The following options are available:&amp;lt;br&amp;gt;&lt;br /&gt;
'answer' causes the line to be answered before playing the tone,&amp;lt;br&amp;gt;&lt;br /&gt;
'nocallerid' causes Zapateller to only play the tone if there&amp;lt;br&amp;gt;&lt;br /&gt;
is no callerid information available.&amp;lt;br&amp;gt;&lt;br /&gt;
Options should be separated by | characters&lt;br /&gt;
&lt;br /&gt;
==ZapBarge==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Barge in (monitor) Zap channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ZapBarge([channel]):&lt;br /&gt;
&lt;br /&gt;
Barges in on a specified zap channel or prompts if one is not specified. Returns -1 when caller user hangs up and is independent of the state of the channel being monitored.&lt;br /&gt;
&lt;br /&gt;
==ZapRAS==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Executes Zaptel ISDN RAS application&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ZapRAS(args):&lt;br /&gt;
&lt;br /&gt;
Executes a RAS server using pppd on the given channel. The channel must be a clear channel (i.e. PRI source) and a Zaptel channel to be able to use this function (No modem emulation is included). Your pppd must be patched to be zaptel aware. Arguments should be separated by | characters.&lt;br /&gt;
&lt;br /&gt;
==ZapScan==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Scan Zap channels to monitor calls&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ZapScan([group]) allows a call center manager to monitor Zap channels in a convenient way.&amp;lt;br&amp;gt;&lt;br /&gt;
Use '#' to select the next channel and use '*' to exit Limit scanning to a channel GROUP by setting the option group argument.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/S-T</id>
		<title>S-T</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/S-T"/>
				<updated>2007-09-12T07:11:04Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Index S-T of Asterisk Applications&lt;br /&gt;
==SayAlpha==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Say Alpha&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SayAlpha(string):&lt;br /&gt;
&lt;br /&gt;
This application will play the sounds that correspond to the letters of the given string.&lt;br /&gt;
&lt;br /&gt;
==SayCountPL==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Say the counting word the fits to a number&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Polish grammar has some funny rules for counting words. for example 1 zloty, 2 zlote, 5 zlotych. This application will take the words for 1, 2-4 and 5 and decide based on grammar rules which one to use with the number you pass to it.&lt;br /&gt;
&lt;br /&gt;
Example: saycountpl(zloty,zlote,zlotych,122) will give: zlote&lt;br /&gt;
&lt;br /&gt;
==SayDigits==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Say Digits&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SayDigits(digits): This application will play the sounds that correspond&lt;br /&gt;
to the digits of the given number. This will use the language that is currently&lt;br /&gt;
set for the channel. See the LANGUAGE function for more information on setting&lt;br /&gt;
the language for the channel.&lt;br /&gt;
&lt;br /&gt;
==SayNumber==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Say Number&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SayNumber(digits[,gender]): This application will play the sounds that correspond to the given number. Optionally, a gender may be specified. This will use the language that is currently set for the channel. See the LANGUAGE function for more information on setting the language for the channel.&lt;br /&gt;
&lt;br /&gt;
==SayPhonetic==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Say Phonetic&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SayPhonetic(string): This application will play the sounds from the phonetic alphabet that correspond to the letters in the given string.&lt;br /&gt;
&lt;br /&gt;
==SayUnixTime==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Says a specified time in a custom format&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
 SayUnixTime([unixtime][|[timezone][|format]])&lt;br /&gt;
   unixtime: time, in seconds since Jan 1, 1970.  May be negative.&lt;br /&gt;
              defaults to now.&lt;br /&gt;
   timezone: timezone, see /usr/share/zoneinfo for a list.&lt;br /&gt;
              defaults to machine default.&lt;br /&gt;
   format:   a format the time is to be said in.  See voicemail.conf.&lt;br /&gt;
              defaults to &amp;quot;ABdY 'digits/at' IMp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==SendDTMF==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Sends arbitrary DTMF digits&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
:: SendDTMF(digits[|timeout_ms]): Sends DTMF digits on a channel.&lt;br /&gt;
:: Accepted digits: 0-9, *#abcd, w (.5s pause)&lt;br /&gt;
:: The application will either pass the assigned digits or terminate if it encounters an error.&lt;br /&gt;
&lt;br /&gt;
==SendImage==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Send an image file&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SendImage(filename): Sends an image on a channel. If the channel supports image transport but the image send fails, the channel will be hung up. Otherwise, the dialplan continues execution.&lt;br /&gt;
The option string may contain the following character:&lt;br /&gt;
        'j' -- jump to priority n+101 if the channel doesn't support image transport&lt;br /&gt;
 This application sets the following channel variable upon completion:&lt;br /&gt;
        SENDIMAGESTATUS         The status is the result of the attempt as a text string, one of&lt;br /&gt;
                OK | NOSUPPORT&lt;br /&gt;
&lt;br /&gt;
==SendText==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Send a Text Message&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SendText(text[|options]): Sends text to current channel (callee).&lt;br /&gt;
Result of transmission will be stored in the SENDTEXTSTATUS&lt;br /&gt;
&lt;br /&gt;
channel variable:&lt;br /&gt;
      SUCCESS      Transmission succeeded&lt;br /&gt;
      FAILURE      Transmission failed&lt;br /&gt;
      UNSUPPORTED  Text transmission not supported by channel&lt;br /&gt;
&lt;br /&gt;
At this moment, text is supposed to be 7 bit ASCII in most channels.&lt;br /&gt;
The option string many contain the following character:&lt;br /&gt;
'j' -- jump to n+101 priority if the channel doesn't support text transport&lt;br /&gt;
&lt;br /&gt;
==SendURL==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Send a URL&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SendURL(URL[|option]): Requests client go to URL (IAX2) or sends the&lt;br /&gt;
URL to the client (other channels).&lt;br /&gt;
&lt;br /&gt;
Result is returned in the SENDURLSTATUS channel variable:&lt;br /&gt;
    SUCCESS       URL successfully sent to client&lt;br /&gt;
    FAILURE       Failed to send URL&lt;br /&gt;
    NOLOAD        Clien failed to load URL (wait enabled)&lt;br /&gt;
    UNSUPPORTED   Channel does not support URL transport&lt;br /&gt;
&lt;br /&gt;
If the option 'wait' is specified, execution will wait for an acknowledgement that the URL has been loaded before continuing and will return -1 if the peer is unable to load the URL&lt;br /&gt;
&lt;br /&gt;
Old behaviour (deprecated):&lt;br /&gt;
 If the client does not support Asterisk &amp;quot;html&amp;quot; transport,&lt;br /&gt;
 and there exists a step with priority n + 101, then execution will&lt;br /&gt;
 continue at that step.&lt;br /&gt;
 Otherwise, execution will continue at the next priority level.&lt;br /&gt;
 SendURL only returns 0 if the URL was sent correctly  or if&lt;br /&gt;
 the channel does not support HTML transport, and -1 otherwise.&lt;br /&gt;
&lt;br /&gt;
==Set==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set channel variable(s) or function value(s)&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Set(name1=value1|name2=value2|..[|options])&lt;br /&gt;
&lt;br /&gt;
This function can be used to set the value of channel variables or dialplan functions. It will accept up to 24 name/value pairs. When setting variables, if the variable name is prefixed with _, the variable will be inherited into channels created from the current channel. If the variable name is prefixed with __, the variable will be inherited into channels created from the current channel and all children channels.&lt;br /&gt;
  Options:&lt;br /&gt;
    g - Set variable globally instead of on the channel&lt;br /&gt;
        (applies only to variables, not functions) &lt;br /&gt;
&lt;br /&gt;
==SetAccount==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set the CDR Account Code&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetAccount([account]):&lt;br /&gt;
&lt;br /&gt;
This application will set the channel account code for billing purposes. SetAccount has been deprecated in favor of the Set(CDR(accountcode)=account).&lt;br /&gt;
&lt;br /&gt;
==SetAMAFlags==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set the AMA Flags&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetAMAFlags([flag]): This channel will set the channel's AMA Flags for billing purposes.&lt;br /&gt;
&lt;br /&gt;
==SetCallerID==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set CallerID&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetCallerID(clid[|a]): Set Caller*ID on a call to a new value.  Sets ANI as well if a flag is used.&lt;br /&gt;
&lt;br /&gt;
==SetCallerPres==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set CallerID Presentation&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetCallerPres(presentation): Set Caller*ID presentation on a call.&lt;br /&gt;
&lt;br /&gt;
Valid presentations are:&lt;br /&gt;
      allowed_not_screened    : Presentation Allowed, Not Screened&lt;br /&gt;
      allowed_passed_screen   : Presentation Allowed, Passed Screen&lt;br /&gt;
      allowed_failed_screen   : Presentation Allowed, Failed Screen&lt;br /&gt;
      allowed                 : Presentation Allowed, Network Number&lt;br /&gt;
      prohib_not_screened     : Presentation Prohibited, Not Screened&lt;br /&gt;
      prohib_passed_screen    : Presentation Prohibited, Passed Screen&lt;br /&gt;
      prohib_failed_screen    : Presentation Prohibited, Failed Screen&lt;br /&gt;
      prohib                  : Presentation Prohibited, Network Number&lt;br /&gt;
      unavailable             : Number Unavailable&lt;br /&gt;
&lt;br /&gt;
==SetCDRUserField==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set the CDR user field&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetCDRUserField(value):&lt;br /&gt;
&lt;br /&gt;
Set the CDR 'user field' to value. The Call Data Record (CDR) user field is an extra field you can use for data not stored anywhere else in the record. CDR records can be used for billing or storing other arbitrary data (I.E. telephone survey responses) Also see AppendCDRUserField().&lt;br /&gt;
&lt;br /&gt;
==SetCIDName==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set CallerID Name&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetCIDName(cname[|a]):&lt;br /&gt;
&lt;br /&gt;
Set Caller*ID Name on a call to a new value, while preserving the original Caller*ID number. This is&lt;br /&gt;
useful for providing additional information to the called party. SetCIDName has been deprecated in favor of the function CALLERID(name)&lt;br /&gt;
&lt;br /&gt;
==SetCIDNum==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set CallerID Number&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetCIDNum(cnum[|a]):&lt;br /&gt;
&lt;br /&gt;
Set Caller*ID Number on a call to a new value, while preserving the original Caller*ID name.  This is&lt;br /&gt;
useful for providing additional information to the called party. Sets ANI as well if a flag is used.&lt;br /&gt;
SetCIDNum has been deprecated in favor of the function CALLERID(number)&lt;br /&gt;
&lt;br /&gt;
==SetGlobalVar==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set a global variable to a given value&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetGlobalVar(variable=value): This application sets a given global variable to the specified value.&lt;br /&gt;
&lt;br /&gt;
==SetGroup==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set the channel's group&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage: SetGroup(groupname[@category])&lt;br /&gt;
&lt;br /&gt;
Sets the channel group to the specified value.  Equivalent to Set(GROUP=group).  Always returns 0.&lt;br /&gt;
&lt;br /&gt;
==SetLanguage==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set the channel's preferred language&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetLanguage(language):&lt;br /&gt;
&lt;br /&gt;
This will set the channel language to the given value. This information is used for the syntax in generation of numbers, and to choose a sound file in the given language, when it is available.&lt;br /&gt;
 For example, if language is set to 'fr' and the file 'demo-congrats' is requested to be played, if the file 'fr/demo-congrats' exists, then it will play that file. If not, it will play the normal 'demo-congrats'. For some language codes, SetLanguage also changes the syntax of some Asterisk functions, like SayNumber. SetLanguage has been deprecated in favor of Set(LANGUAGE()=language)&lt;br /&gt;
&lt;br /&gt;
==SetMusicOnHold==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set default Music On Hold class&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetMusicOnHold(class):&lt;br /&gt;
&lt;br /&gt;
Sets the default class for music on hold for a given channel. When music on hold is activated, this class will be used to select which music is played.&lt;br /&gt;
&lt;br /&gt;
==SetRDNIS==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set RDNIS Number&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetRDNIS(cnum): Set RDNIS Number on a call to a new value. SetRDNIS has been deprecated in favor of the function CALLERID(rdnis)&lt;br /&gt;
&lt;br /&gt;
==SetTransferCapability==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set ISDN Transfer Capability&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetTransferCapability(transfercapability): Set the ISDN Transfer Capability of a call to a new value.&lt;br /&gt;
&lt;br /&gt;
Valid Transfer Capabilities are:&lt;br /&gt;
&lt;br /&gt;
  SPEECH             : 0x00 - Speech (default, voice calls)&lt;br /&gt;
  DIGITAL            : 0x08 - Unrestricted digital information (data calls)&lt;br /&gt;
  RESTRICTED_DIGITAL : 0x09 - Restricted digital information&lt;br /&gt;
  3K1AUDIO           : 0x10 - 3.1kHz Audio (fax calls)&lt;br /&gt;
  DIGITAL_W_TONES    : 0x11 - Unrestricted digital information with tones/announcements&lt;br /&gt;
  VIDEO              : 0x18 - Video:&lt;br /&gt;
&lt;br /&gt;
==SetVar==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set channel variable(s)&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SetVar(name1=value1|name2=value2|..[|options]):&lt;br /&gt;
&lt;br /&gt;
This application has been deprecated in favor of using the Set application.&lt;br /&gt;
&lt;br /&gt;
==SIPAddHeader==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Add a SIP header to the outbound call&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SIPAddHeader(Header: Content) Adds a header to a SIP call placed with DIAL. Remember to user the X-header if you are adding non-standard SIP headers, like &amp;quot;X-Asterisk-Accountcode:&amp;quot;. Use this with care. Adding the wrong headers may jeopardize the SIP dialog. Always returns 0&lt;br /&gt;
&lt;br /&gt;
==SIPDtmfMode==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Change the dtmfmode for a SIP call&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SIPDtmfMode(inband|info|rfc2833): Changes the dtmfmode for a SIP call&lt;br /&gt;
&lt;br /&gt;
==SIPGetHeader==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Get a SIP header from an incoming call&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SIPGetHeader(var=headername[|options]):&lt;br /&gt;
&lt;br /&gt;
Sets a channel variable to the content of a SIP header&lt;br /&gt;
  Options:&lt;br /&gt;
    j - Jump to priority n+101 if the requested header isn't found.&lt;br /&gt;
  This application sets the following channel variable upon completion:&lt;br /&gt;
      SIPGETSTATUS - This variable will contain the status of the attempt&lt;br /&gt;
                     FOUND | NOTFOUND&lt;br /&gt;
This application has been deprecated in favor of the SIP_HEADER function.&lt;br /&gt;
&lt;br /&gt;
==SMS==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Communicates with SMS service centres and SMS capable analogue phones&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SMS(name|[a][s]):&lt;br /&gt;
&lt;br /&gt;
SMS handles exchange of SMS data with a call to/from SMS capabale phone or SMS PSTN service center. Can send and/or receive SMS messages. Works to ETSI ES 201 912 compatible with BT SMS PSTN service in UK&lt;br /&gt;
Typical usage is to use to handle called from the SMS service centre CLI, or to set up a call using 'outgoing' or manager interface to connect service centre to SMS() name is the name of the queue used in /var/spool/asterisk/sms&lt;br /&gt;
Arguments:&lt;br /&gt;
 a: answer, i.e. send initial FSK packet.&lt;br /&gt;
 s: act as service centre talking to a phone.&lt;br /&gt;
Messages are processed as per text file message queues.&lt;br /&gt;
smsq (a separate software) is a command to generate message&lt;br /&gt;
queues and send messages.&lt;br /&gt;
&lt;br /&gt;
==SoftHangup==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Soft Hangup Application&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
SoftHangup(Technology/resource|options)&lt;br /&gt;
&lt;br /&gt;
Hangs up the requested channel.  If there are no channels to hangup, the application will report it.&lt;br /&gt;
 - 'options' may contain the following letter:&lt;br /&gt;
     'a' : hang up all channels on a specified device instead of a single resource&lt;br /&gt;
&lt;br /&gt;
==Sort==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Sorts a list of keywords and values&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Sort(newvar=key1:val1[,key2:val2[[...],keyN:valN]]):&lt;br /&gt;
&lt;br /&gt;
This application will sort the list provided in ascending order. The result will be stored in the specified variable name. This application has been deprecated in favor of the SORT function.&lt;br /&gt;
&lt;br /&gt;
==StackPop==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Remove one address from gosub stack&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
StackPop() Removes last label on the stack, discarding it.&lt;br /&gt;
&lt;br /&gt;
==StartMusicOnHold==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play Music On Hold&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
StartMusicOnHold(class):&lt;br /&gt;
&lt;br /&gt;
Starts playing music on hold, uses default music class for channel. Starts playing music specified by class.  If omitted, the default music source for the channel will be used.  Always returns 0.&lt;br /&gt;
&lt;br /&gt;
==StopMonitor==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Stop monitoring a channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
StopMonitor&lt;br /&gt;
&lt;br /&gt;
Stops monitoring a channel. Has no effect if the channel is not monitored&lt;br /&gt;
&lt;br /&gt;
==StopMusicOnHold==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Stop Playing Music On Hold&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
StopMusicOnHold: Stops playing music on hold.&lt;br /&gt;
&lt;br /&gt;
==StopPlayTones==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Stop playing a tone list&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Stop playing a tone list&lt;br /&gt;
&lt;br /&gt;
==System==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Execute a system command&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
System(command):&lt;br /&gt;
&lt;br /&gt;
Executes a command  by  using  system(). If the command fails, the console should report a fallthrough.&lt;br /&gt;
&lt;br /&gt;
Result of execution is returned in the SYSTEMSTATUS channel variable:&lt;br /&gt;
   FAILURE      Could not execute the specified command&lt;br /&gt;
   SUCCESS      Specified command successfully executed&lt;br /&gt;
&lt;br /&gt;
Old behaviour: If the command itself executes but is in error, and if there exists a priority n + 101, where 'n' is the priority of the current instance, then  the  channel  will  be  setup to continue at that priority level. Note that this jump functionality has been deprecated and will only occur if the global priority jumping option is enabled in extensions.conf.&lt;br /&gt;
&lt;br /&gt;
==TestClient==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Execute Interface Test Client&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
TestClient(testid):&lt;br /&gt;
&lt;br /&gt;
Executes test client with given testid.&lt;br /&gt;
&lt;br /&gt;
Results stored in var/log/asterisk/testreports/&amp;lt;testid&amp;gt;-client.txt&lt;br /&gt;
&lt;br /&gt;
==TestServer==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Execute Interface Test Server&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
TestServer(): Perform test server function and write call report.&lt;br /&gt;
&lt;br /&gt;
Results stored in /var/log/asterisk/testreports/&amp;lt;testid&amp;gt;-server.txt&lt;br /&gt;
&lt;br /&gt;
==Transfer==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Transfer caller to remote extension&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Transfer([Tech/]dest[|options]):&lt;br /&gt;
&lt;br /&gt;
Requests the remote caller be transferred to a given destination. If TECH (SIP, IAX2, LOCAL etc) is used, only an incoming call with the same channel technology will be transfered. Note that for SIP, if you transfer before call is setup, a 302 redirect SIP message will be returned to the caller.&lt;br /&gt;
&lt;br /&gt;
The result of the application will be reported in the TRANSFERSTATUS channel variable:&lt;br /&gt;
:: SUCCESS &amp;amp;nbsp;&amp;amp;nbsp; Transfer succeeded&lt;br /&gt;
:: FAILURE  &amp;amp;nbsp; Transfer failed&lt;br /&gt;
:: UNSUPPORTED &amp;amp;nbsp; Transfer unsupported by channel driver&lt;br /&gt;
The option string many contain the following character:&lt;br /&gt;
'j' -- jump to n+101 priority if the channel transfer attempt fails&lt;br /&gt;
&lt;br /&gt;
==TrySystem==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Try executing a system command&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
TrySystem(command):&lt;br /&gt;
&lt;br /&gt;
Executes a command  by  using  system(). on any situation. Result of execution is returned in the SYSTEMSTATUS channel variable:&lt;br /&gt;
:: FAILURE &amp;amp;nbsp;&amp;amp;nbsp; Could not execute the specified command&lt;br /&gt;
:: SUCCESS &amp;amp;nbsp;&amp;amp;nbsp; Specified command successfully executed&lt;br /&gt;
:: APPERROR &amp;amp;nbsp;&amp;amp;nbsp; Specified command successfully executed, but returned error code&lt;br /&gt;
&lt;br /&gt;
Old behaviour:&lt;br /&gt;
&lt;br /&gt;
If the command itself executes but is in error, and if there exists a priority n + 101, where 'n' is the priority of the current instance, then the channel will be setup to continue at that priority level. Otherwise, System will terminate.&lt;br /&gt;
&lt;br /&gt;
==TXTCIDName==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Lookup caller name from TXT record&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
TXTCIDName(&amp;lt;CallerIDNumber&amp;gt;[|options]):&lt;br /&gt;
&lt;br /&gt;
Looks up a Caller Name via DNS and sets the variable 'TXTCIDNAME'. TXTCIDName will either be blank or return the value found in the TXT record in DNS.&lt;br /&gt;
&lt;br /&gt;
The option string may contain the following character:&lt;br /&gt;
 'j' -- jump to n+101 priority if the lookup fails&lt;br /&gt;
 This application sets the following channel variable upon completion:&lt;br /&gt;
  TXTCIDNAMESTATUS The status of the lookup as a text string, one of&lt;br /&gt;
      SUCCESS | FAILED&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/P-R</id>
		<title>P-R</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/P-R"/>
				<updated>2007-09-12T06:19:05Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* Record */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Index P-R of Asterisk Applications&lt;br /&gt;
==Page==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Pages phones&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Page(Technology/Resource&amp;amp;Technology2/Resource2[|options])&lt;br /&gt;
&lt;br /&gt;
Places outbound calls to the given technology / resource and dumps them into a conference bridge as muted participants.  The original caller is dumped into the conference as a speaker and the room is destroyed when the original caller leaves.  Valid options are:&lt;br /&gt;
:: d - full duplex audio&lt;br /&gt;
:: q - quiet, do not play beep to caller&lt;br /&gt;
        &lt;br /&gt;
==Park==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Park yourself&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Park():&lt;br /&gt;
&lt;br /&gt;
Used to park yourself (typically in combination with a supervised transfer to know the parking space). This application is always registered internally and does not need to be explicitly added into the dialplan, although you should include the 'parkedcalls' context.&lt;br /&gt;
&lt;br /&gt;
==ParkAndAnnounce==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Park and Announce&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ParkAndAnnounce(announce:template|timeout|dial|[return_context]):&lt;br /&gt;
&lt;br /&gt;
Park a call into the parkinglot and announce the call over the console. announce template: colon separated list of files to announce, the word PARKED will be replaced by a say_digits of the ext the call is parked in timeout: time in seconds before the call returns into the return context. dial: The app_dial style resource to call to make the announcement. Console/dsp calls the console. return_context: the goto style label to jump the call back into after timeout. default=prio+1&lt;br /&gt;
&lt;br /&gt;
==ParkedCall==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Answer a parked call&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ParkedCall(exten):&lt;br /&gt;
&lt;br /&gt;
Used to connect to a parked call. This application is always registered internally and does not need to be explicitly added into the dialplan, although you should include the 'parkedcalls' context.&lt;br /&gt;
&lt;br /&gt;
==PauseQueueMember==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Pauses a queue member&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
PauseQueueMember([queuename]|interface[|options]):&lt;br /&gt;
&lt;br /&gt;
Pauses (blocks calls for) a queue member. The given interface will be paused in the given queue.  This prevents any calls from being sent from the queue to the interface until it is unpaused with UnpauseQueueMember or the manager interface. If no queuename is given, the interface is paused in every queue it is a member of. If the interface is not in the named queue, or if no queue is given and the interface is not in any queue, it will jump to priority n+101, if it exists and the appropriate options are set.&lt;br /&gt;
The application will fail if the interface is not found and no extension to jump to exists.&lt;br /&gt;
The option string may contain zero or more of the following characters:&lt;br /&gt;
:: 'j' -- jump to +101 priority when appropriate.&lt;br /&gt;
: This application sets the following channel variable upon completion:&lt;br /&gt;
:: PQMSTATUS      The status of the attempt to pause a queue member as a&lt;br /&gt;
::: text string, one of&lt;br /&gt;
:::: PAUSED | NOTFOUND&lt;br /&gt;
 Example: PauseQueueMember(|SIP/3000)&lt;br /&gt;
&lt;br /&gt;
==Pickup==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Directed Call Pickup&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Pickup(extension[@context]):&lt;br /&gt;
&lt;br /&gt;
This application can pickup any ringing channel that is calling the specified extension. If no context is specified, the current context will be used.&lt;br /&gt;
&lt;br /&gt;
==Playback==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play a file&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Playback(filename[&amp;amp;filename2...][|option]):&lt;br /&gt;
&lt;br /&gt;
Plays back given filenames (do not put extension). Options may also be included following a pipe symbol. The 'skip' option causes the playback of the message to be skipped if the channel is not in the 'up' state (i.e. it hasn't been  answered  yet). If 'skip' is specified, the application will return immediately should the channel not be off hook.  Otherwise, unless 'noanswer' is specified, the channel will be answered before the sound is played. Not all channels support playing messages while still on hook. If 'j' is specified, the application will jump to priority n+101 if present when a file specified to be played does not exist.&lt;br /&gt;
This application sets the following channel variable upon completion:&lt;br /&gt;
: PLAYBACKSTATUS    The status of the playback attempt as a text string, one of&lt;br /&gt;
:: SUCCESS | FAILED&lt;br /&gt;
&lt;br /&gt;
==PlayTones==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play a tone list&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
PlayTones(arg):&lt;br /&gt;
&lt;br /&gt;
Plays a tone list. Execution will continue with the next step immediately, while the tones continue to play. Arg is either the tone name defined in the indications.conf configuration file, or a directly specified list of frequencies and durations. See the sample indications.conf for a description of the specification of a tonelist. Use the StopPlayTones application to stop the tones playing.&lt;br /&gt;
&lt;br /&gt;
==PrivacyManager==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Require phone number to be entered, if no CallerID sent&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
PrivacyManager([maxretries[|minlength[|options]]]):&lt;br /&gt;
&lt;br /&gt;
If no Caller*ID is sent, PrivacyManager answers the channel and asks the caller to enter their phone number. The caller is given 3 attempts to do so.&lt;br /&gt;
The application does nothing if Caller*ID was received on the channel.&lt;br /&gt;
: Configuration file privacy.conf contains two variables:&lt;br /&gt;
:: maxretries  default 3  -maximum number of attempts the caller is allowed&lt;br /&gt;
::: to input a callerid.&lt;br /&gt;
:: minlength   default 10 -minimum allowable digits in the input callerid number.&lt;br /&gt;
If you don't want to use the config file and have an i/o operation with&lt;br /&gt;
every call, you can also specify maxretries and minlength as application&lt;br /&gt;
parameters. Doing so supercedes any values set in privacy.conf.&lt;br /&gt;
The option string may contain the following character:&lt;br /&gt;
: 'j' -- jump to n+101 priority after &amp;lt;maxretries&amp;gt; failed attempts to collect&lt;br /&gt;
:: the minlength number of digits.&lt;br /&gt;
The application sets the following channel variable upon completion:&lt;br /&gt;
PRIVACYMGRSTATUS  The status of the privacy manager's attempt to collect&lt;br /&gt;
::: a phone number from the user. A text string that is either:&lt;br /&gt;
:: SUCCESS | FAILED&lt;br /&gt;
&lt;br /&gt;
==Progress==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Indicate progress&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Progress():&lt;br /&gt;
&lt;br /&gt;
This application will request that in-band progress information be provided to the calling channel.&lt;br /&gt;
&lt;br /&gt;
==Queue==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Queue a call for a call queue&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Queue(queuename[|options[|URL][|announceoverride][|timeout]]):&lt;br /&gt;
&lt;br /&gt;
Queues an incoming call in a particular call queue as defined in queues.conf.&lt;br /&gt;
This application will return to the dialplan if the queue does not exist, or any of the join options cause the caller to not enter the queue.&lt;br /&gt;
&lt;br /&gt;
The option string may contain zero or more of the following characters:&lt;br /&gt;
      'd' -- data-quality (modem) call (minimum delay).&lt;br /&gt;
      'h' -- allow callee to hang up by hitting *.&lt;br /&gt;
      'H' -- allow caller to hang up by hitting *.&lt;br /&gt;
      'n' -- no retries on the timeout; will exit this application and&lt;br /&gt;
              go to the next step.&lt;br /&gt;
      'r' -- ring instead of playing MOH&lt;br /&gt;
      't' -- allow the called user transfer the calling user&lt;br /&gt;
      'T' -- to allow the calling user to transfer the call.&lt;br /&gt;
      'w' -- allow the called user to write the conversation to disk via Monitor&lt;br /&gt;
      'W' -- allow the calling user to write the conversation to disk via Monitor&lt;br /&gt;
  In addition to transferring the call, a call may be parked and then picked&lt;br /&gt;
  up by another user.&lt;br /&gt;
  The optional URL will be sent to the called party if the channel supports it.&lt;br /&gt;
  The timeout will cause the queue to fail out after a specified number of&lt;br /&gt;
  seconds, checked between each queues.conf 'timeout' and 'retry' cycle.&lt;br /&gt;
  This application sets the following channel variable upon completion:&lt;br /&gt;
      QUEUESTATUS    The status of the call as a text string, one of&lt;br /&gt;
             TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL&lt;br /&gt;
&lt;br /&gt;
==Random==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Conditionally branches, based upon a probability&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Random([probability]:[context|]extension|]priority)&lt;br /&gt;
probability := INTEGER in the range 1 to 100&lt;br /&gt;
&lt;br /&gt;
==Read==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Read a variable&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])&lt;br /&gt;
&lt;br /&gt;
Reads a #-terminated string of digits a certain number of times from the user in to the given variable.&lt;br /&gt;
  filename   -- file to play before reading digits.&lt;br /&gt;
  maxdigits  -- maximum acceptable number of digits. Stops reading after&lt;br /&gt;
                maxdigits have been entered (without requiring the user to&lt;br /&gt;
                press the '#' key).&lt;br /&gt;
                Defaults to 0 - no limit - wait for the user press the '#' key.&lt;br /&gt;
                Any value below 0 means the same. Max accepted value is 255.&lt;br /&gt;
  option     -- may be 'skip' to return immediately if the line is not up,&lt;br /&gt;
                or 'noanswer' to read digits even if the line is not up.&lt;br /&gt;
  attempts   -- if greater than 1, that many attempts will be made in the&lt;br /&gt;
                event no data is entered.&lt;br /&gt;
  timeout    -- if greater than 0, that value will override the default timeout.&lt;br /&gt;
&lt;br /&gt;
Read should disconnect if the function fails or errors out.&lt;br /&gt;
&lt;br /&gt;
==ReadFile==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
ReadFile(varname=file,length)&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ReadFile(varname=file,length)&lt;br /&gt;
Varname - Result stored here.&lt;br /&gt;
File - The name of the file to read.&lt;br /&gt;
Length - Maximum number of characters to capture.&lt;br /&gt;
&lt;br /&gt;
==RealTime==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Realtime Data Lookup&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Use the RealTime config handler system to read data into channel variables.&lt;br /&gt;
 RealTime(&amp;lt;family&amp;gt;|&amp;lt;colmatch&amp;gt;|&amp;lt;value&amp;gt;[|&amp;lt;prefix&amp;gt;])&lt;br /&gt;
All unique column names will be set as channel variables with optional prefix to the name. e.g. prefix of 'var_' would make the column 'name' become the variable ${var_name}&lt;br /&gt;
&lt;br /&gt;
==RealTimeUpdate==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Realtime Data Rewrite&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Use the RealTime config handler system to update a value&lt;br /&gt;
 RealTimeUpdate(&amp;lt;family&amp;gt;|&amp;lt;colmatch&amp;gt;|&amp;lt;value&amp;gt;|&amp;lt;newcol&amp;gt;|&amp;lt;newval&amp;gt;)&lt;br /&gt;
The column &amp;lt;newcol&amp;gt; in 'family' matching column &amp;lt;colmatch&amp;gt;=&amp;lt;value&amp;gt; will be updated to &amp;lt;newval&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Record==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Record to a file&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
Record(filename.format|silence[|maxduration][|options])&lt;br /&gt;
&lt;br /&gt;
Records from the channel into a given filename. If the file exists it will be overwritten.&lt;br /&gt;
 - 'format' is the format of the file type to be recorded (wav, gsm, etc).&lt;br /&gt;
 - 'silence' is the number of seconds of silence to allow before returning.&lt;br /&gt;
 - 'maxduration' is the maximum recording duration in seconds. If missing&lt;br /&gt;
 or 0 there is no maximum.&lt;br /&gt;
 - 'options' may contain any of the following letters:&lt;br /&gt;
     'a' : append to existing recording rather than replacing&lt;br /&gt;
     'n' : do not answer, but record anyway if line not yet answered&lt;br /&gt;
     'q' : quiet (do not play a beep tone)&lt;br /&gt;
     's' : skip recording if the line is not yet answered&lt;br /&gt;
     't' : use alternate '*' terminator key instead of default '#'&lt;br /&gt;
If filename contains '%d', these characters will be replaced with a number incremented by one each time the file is recorded. A channel variable named RECORDED_FILE will also be set, which contains the final filemname.&lt;br /&gt;
&lt;br /&gt;
Use 'show file formats' to see the available formats on your system&lt;br /&gt;
&lt;br /&gt;
User can press '#' to terminate the recording and continue to the next priority.&lt;br /&gt;
&lt;br /&gt;
If the user should hangup during a recording, all data will be lost and the application will teminate.&lt;br /&gt;
&lt;br /&gt;
==RemoveQueueMember==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Dynamically removes queue members&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
RemoveQueueMember(queuename[|interface[|options]]):&lt;br /&gt;
&lt;br /&gt;
Dynamically removes interface to an existing queue If the interface is NOT in the queue and there exists an n+101 priority then it will then jump to this priority.  Otherwise it will return an error The option string may contain zero or more of the following characters:&lt;br /&gt;
       'j' -- jump to +101 priority when appropriate.&lt;br /&gt;
  This application sets the following channel variable upon completion:&lt;br /&gt;
     RQMSTATUS      The status of the attempt to remove a queue member as a&lt;br /&gt;
                     text string, one of&lt;br /&gt;
           REMOVED | NOTINQUEUE | NOSUCHQUEUE&lt;br /&gt;
 Example: RemoveQueueMember(techsupport|SIP/3000)&lt;br /&gt;
&lt;br /&gt;
==ResetCDR==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Resets the Call Data Record&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ResetCDR([options]):&lt;br /&gt;
&lt;br /&gt;
This application causes the Call Data Record to be reset.&lt;br /&gt;
: Options:&lt;br /&gt;
:: w -- Store the current CDR record before resetting it.&lt;br /&gt;
:: a -- Store any stacked records.&lt;br /&gt;
:: v -- Save CDR variables.&lt;br /&gt;
&lt;br /&gt;
==ResponseTimeout==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set maximum timeout awaiting response&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ResponseTimeout(seconds):&lt;br /&gt;
&lt;br /&gt;
This will set the maximum amount of time permitted to wait for an extension to dialed (see the WaitExten application), before the timeout occurs. If this timeout is reached, dialplan execution will continue at the 't' extension, if it exists.&lt;br /&gt;
ResponseTimeout has been deprecated in favor of Set(TIMEOUT(response)=timeout)&lt;br /&gt;
&lt;br /&gt;
==RetryDial==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Place a call, retrying on failure allowing optional exit extension.&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
RetryDial(announce|sleep|retries|dialargs):&lt;br /&gt;
&lt;br /&gt;
This application will attempt to place a call using the normal Dial application. If no channel can be reached, the 'announce' file will be played. Then, it will wait 'sleep' number of seconds before retying the call. After 'retires' number of attempts, the calling channel will continue at the next priority in the dialplan. If the 'retries' setting is set to 0, this application will retry endlessly. While waiting to retry a call, a 1 digit extension may be dialed. If that extension exists in either the context defined in ${EXITCONTEXT} or the current one, The call will jump to that extension immediately. The 'dialargs' are specified in the same format that arguments are provided to the Dial application.&lt;br /&gt;
&lt;br /&gt;
==Return==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Return from gosub routine&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Return()&lt;br /&gt;
Jumps to the last label on the stack, removing it.&lt;br /&gt;
&lt;br /&gt;
==Ringing==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Indicate ringing tone&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Ringing():&lt;br /&gt;
&lt;br /&gt;
This application will request that the channel indicate a ringing tone to the user.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/M-N</id>
		<title>M-N</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/M-N"/>
				<updated>2007-09-12T05:58:42Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* Macro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Index M-N of Asterisk Applications&lt;br /&gt;
==Macro==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Macro Implementation&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Macro(macroname|arg1|arg2...):&lt;br /&gt;
&lt;br /&gt;
Executes a macro using the context 'macro-&amp;lt;macroname&amp;gt;', jumping to the 's' extension of that context and executing each step, then returning when the steps end. The calling extension, context, and priority are stored in ${MACRO_EXTEN}, ${MACRO_CONTEXT} and ${MACRO_PRIORITY} respectively.&lt;br /&gt;
&lt;br /&gt;
Arguments become ${ARG1}, ${ARG2}, etc in the macro context.&lt;br /&gt;
If you Goto out of the Macro context, the Macro will terminate and control will be returned at the location of the Goto.&lt;br /&gt;
&lt;br /&gt;
If ${MACRO_OFFSET} is set at termination, Macro will attempt to continue at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.&lt;br /&gt;
&lt;br /&gt;
Extensions: While a macro is being executed, it becomes the current context.&lt;br /&gt;
:: This means that if a hangup occurs, for instance, that the macro&lt;br /&gt;
:: will be searched for an 'h' extension, NOT the context from which&lt;br /&gt;
:: the macro was called. So, make sure to define all appropriate&lt;br /&gt;
:: extensions in your macro! (you can use 'catch' in AEL)&lt;br /&gt;
WARNING: Because of the way Macro is implemented (it executes the priorities&lt;br /&gt;
:: contained within it via sub-engine), and a fixed per-thread&lt;br /&gt;
:: memory stack allowance, macros are limited to 7 levels&lt;br /&gt;
:: of nesting (macro calling macro calling macro, etc.); It&lt;br /&gt;
:: may be possible that stack-intensive applications in deeply nested&lt;br /&gt;
:: macros could cause asterisk to crash earlier than this limit.&lt;br /&gt;
&lt;br /&gt;
==MacroExit==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Exit From Macro&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MacroExit():&lt;br /&gt;
&lt;br /&gt;
Causes the currently running macro to exit as if it had ended normally by running out of priorities to execute. If used outside a macro, will likely cause unexpected behavior.&lt;br /&gt;
&lt;br /&gt;
==MacroIf==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Conditional Macro Implementation&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MacroIf(&amp;lt;expr&amp;gt;?macroname_a[|arg1][:macroname_b[|arg1]]) Executes macro defined in &amp;lt;macroname_a&amp;gt; if &amp;lt;expr&amp;gt; is true (otherwise &amp;lt;macroname_b&amp;gt; if provided) Arguments and return values as in application macro()&lt;br /&gt;
&lt;br /&gt;
==MailboxExists==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Check to see if Voicemail mailbox exists&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MailboxExists(mailbox[@context][|options]):&lt;br /&gt;
&lt;br /&gt;
Check to see if the specified mailbox exists. If no voicemail context is specified, the 'default' context will be used. This application will set the following channel variable upon completion:&lt;br /&gt;
: VMBOXEXISTSSTATUS - This will contain the status of the execution of the&lt;br /&gt;
:: MailboxExists application. Possible values include:&lt;br /&gt;
:: SUCCESS | FAILED&lt;br /&gt;
Options:&lt;br /&gt;
:: j - Jump to priority n+101 if the mailbox is found.&lt;br /&gt;
&lt;br /&gt;
==Math==&lt;br /&gt;
&lt;br /&gt;
'''[Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Performs Mathematical Functions&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Math(returnvar,&amp;lt;number1&amp;gt;&amp;lt;op&amp;gt;&amp;lt;number 2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Perform floating point calculation on number 1 to number 2 and store the result in returnvar.  Valid ops are:&lt;br /&gt;
    +,-,/,*,%,&amp;lt;,&amp;gt;,&amp;gt;=,&amp;lt;=,==&lt;br /&gt;
and behave as their C equivalents. This application has been deprecated in favor of the MATH function.&lt;br /&gt;
&lt;br /&gt;
==MD5==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Calculate MD5 checksum&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MD5(&amp;lt;var&amp;gt;=&amp;lt;string&amp;gt;): Calculates a MD5 checksum on &amp;lt;string&amp;gt;. Returns hash value in a channel variable.&lt;br /&gt;
&lt;br /&gt;
==MD5Check==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Check MD5 checksum&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MD5Check(&amp;lt;md5hash&amp;gt;|&amp;lt;string&amp;gt;[|options]):&lt;br /&gt;
&lt;br /&gt;
Calculates a MD5 checksum on &amp;lt;string&amp;gt; and compares it with the hash. Returns 0 if &amp;lt;md5hash&amp;gt; is correct for &amp;lt;string&amp;gt;. The option string may contain zero or more of the following characters:&lt;br /&gt;
:: 'j' -- jump to priority n+101 if the hash and string do not match&lt;br /&gt;
This application sets the following channel variable upon completion:&lt;br /&gt;
:: CHECKMD5STATUS  The status of the MD5 check, one of the following&lt;br /&gt;
::: MATCH | NOMATCH&lt;br /&gt;
&lt;br /&gt;
==MeetMe==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
MeetMe conference bridge&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MeetMe([confno][,[options][,pin]]):&lt;br /&gt;
&lt;br /&gt;
Enters the user into a specified MeetMe conference. If the conference number is omitted, the user will be prompted to enter one. User can exit the conference by hangup, or if the 'p' option is specified, by pressing '#'.&lt;br /&gt;
&lt;br /&gt;
Please note: The Zaptel kernel modules and at least one hardware driver (or ztdummy)&lt;br /&gt;
:: must be present for conferencing to operate properly. In addition, the chan_zap&lt;br /&gt;
:: channel driver must be loaded for the 'i' and 'r' options to operate at all.&lt;br /&gt;
&lt;br /&gt;
 The option string may contain zero or more of the following characters:&lt;br /&gt;
      'a' -- set admin mode&lt;br /&gt;
      'A' -- set marked mode&lt;br /&gt;
      'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}&lt;br /&gt;
             Default: conf-background.agi&lt;br /&gt;
             (Note: This does not work with non-Zap channels in the same conference)&lt;br /&gt;
      'c' -- announce user(s) count on joining a conference&lt;br /&gt;
      'd' -- dynamically add conference&lt;br /&gt;
      'D' -- dynamically add conference, prompting for a PIN&lt;br /&gt;
      'e' -- select an empty conference&lt;br /&gt;
      'E' -- select an empty pinless conference&lt;br /&gt;
      'i' -- announce user join/leave&lt;br /&gt;
      'm' -- set monitor only mode (Listen only, no talking)&lt;br /&gt;
      'M' -- enable music on hold when the conference has a single caller&lt;br /&gt;
      'p' -- allow user to exit the conference by pressing '#'&lt;br /&gt;
      'P' -- always prompt for the pin even if it is specified&lt;br /&gt;
      'q' -- quiet mode (don't play enter/leave sounds)&lt;br /&gt;
      'r' -- Record conference (records as ${MEETME_RECORDINGFILE}&lt;br /&gt;
             using format ${MEETME_RECORDINGFORMAT}). Default filename is&lt;br /&gt;
             meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is wav.&lt;br /&gt;
      's' -- Present menu (user or admin) when '*' is received ('send' to menu)&lt;br /&gt;
      't' -- set talk only mode. (Talk only, no listening)&lt;br /&gt;
      'T' -- set talker detection (sent to manager interface and meetme list)&lt;br /&gt;
      'w[(&amp;lt;secs&amp;gt;)]'&lt;br /&gt;
          -- wait until the marked user enters the conference&lt;br /&gt;
      'x' -- close the conference when last marked user exits&lt;br /&gt;
      'X' -- allow user to exit the conference by entering a valid single&lt;br /&gt;
             digit extension ${MEETME_EXIT_CONTEXT} or the current context&lt;br /&gt;
             if that variable is not defined.&lt;br /&gt;
&lt;br /&gt;
==MeetMeAdmin==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
MeetMe conference Administration&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
  MeetMeAdmin(confno,command[,user]): Run admin command for conference&lt;br /&gt;
      'e' -- Eject last user that joined&lt;br /&gt;
      'k' -- Kick one user out of conference&lt;br /&gt;
      'K' -- Kick all users out of conference&lt;br /&gt;
      'l' -- Unlock conference&lt;br /&gt;
      'L' -- Lock conference&lt;br /&gt;
      'm' -- Unmute conference&lt;br /&gt;
      'M' -- Mute conference&lt;br /&gt;
     'n' -- Unmute entire conference (except admin)&lt;br /&gt;
      'N' -- Mute entire conference (except admin)&lt;br /&gt;
&lt;br /&gt;
==MeetMeCount==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
MeetMe participant count&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MeetMeCount(confno[|var]):&lt;br /&gt;
&lt;br /&gt;
Plays back the number of users in the specified MeetMe conference. If var is specified, playback will be skipped and the value will be returned in the variable. Upon app completion, MeetMeCount will hangup the channel, unless priority n+1 exists, in which case priority progress will continue. A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY.&lt;br /&gt;
&lt;br /&gt;
==Milliwatt==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Generate a Constant 1000Hz tone at 0dbm (mu-law)&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Milliwatt(): Generate a Constant 1000Hz tone at 0dbm (mu-law)&lt;br /&gt;
&lt;br /&gt;
==misdn_check_l2l1==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
misdn_check_l2l1&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
misdn_check_l2l1(&amp;lt;port&amp;gt;||g:&amp;lt;groupname&amp;gt;,timeout)Checks if the L2 and L1 are up on either the given &amp;lt;port&amp;gt; or on the ports in the group with &amp;lt;groupname&amp;gt; If the L1/L2 are down, check_l2l1 gets up the L1/L2 and waits for &amp;lt;timeout&amp;gt; seconds that this happens. Otherwise, nothing happens&lt;br /&gt;
&lt;br /&gt;
This application, ensures the L1/L2 state of the Ports in a group it is intended to make the pmp_l1_check option redundant and to fix a buggy switch config from your provider&lt;br /&gt;
&lt;br /&gt;
a sample dialplan would look like:&lt;br /&gt;
 exten =&amp;gt; _X.,1,misdn_check_l2l1(g:out|2)&lt;br /&gt;
 exten =&amp;gt; _X.,n,dial(mISDN/g:out/${EXTEN})&lt;br /&gt;
&lt;br /&gt;
==misdn_facility==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
misdn_facility&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
misdn_facility(&amp;lt;FACILITY_TYPE&amp;gt;|&amp;lt;ARG1&amp;gt;|..) Sends the Facility Message FACILITY_TYPE with the given Arguments to the current ISDN Channel Supported Facilities are:&lt;br /&gt;
: type=calldeflect args=Nr where to deflect&lt;br /&gt;
&lt;br /&gt;
==misdn_set_opt==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
misdn_set_opt&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
misdn_set_opt(:&amp;lt;opt&amp;gt;&amp;lt;optarg&amp;gt;:&amp;lt;opt&amp;gt;&amp;lt;optarg&amp;gt;..):&lt;br /&gt;
Sets mISDN opts. and optargs&lt;br /&gt;
&lt;br /&gt;
 The available options are:&lt;br /&gt;
    d - Send display text on called phone, text is the optparam&lt;br /&gt;
    n - don't detect dtmf tones on called channel&lt;br /&gt;
    h - make digital outgoing call&lt;br /&gt;
    c - make crypted outgoing call, param is keyindex&lt;br /&gt;
    e - perform echo cancelation on this channel,&lt;br /&gt;
        takes taps as arguments (32,64,128,256)&lt;br /&gt;
    s - send Non Inband DTMF as inband&lt;br /&gt;
   vr - rxgain control&lt;br /&gt;
   vt - txgain control&lt;br /&gt;
&lt;br /&gt;
==MixMonitor==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Record a call and mix the audio during the recording&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MixMonitor(&amp;lt;file&amp;gt;.&amp;lt;ext&amp;gt;[|&amp;lt;options&amp;gt;[|&amp;lt;command&amp;gt;]])&lt;br /&gt;
&lt;br /&gt;
Records the audio on the current channel to the specified file. If the filename is an absolute path, uses that path, otherwise creates the file in the configured monitoring directory from asterisk.conf.&lt;br /&gt;
&lt;br /&gt;
Valid options:&lt;br /&gt;
 a      - Append to the file instead of overwriting it.&lt;br /&gt;
 b      - Only save audio to the file while the channel is bridged.&lt;br /&gt;
          Note: Does not include conferences or sounds played to each bridged&lt;br /&gt;
                party.&lt;br /&gt;
 v(&amp;lt;x&amp;gt;) - Adjust the heard volume by a factor of &amp;lt;x&amp;gt; (range -4 to 4)&lt;br /&gt;
 V(&amp;lt;x&amp;gt;) - Adjust the spoken volume by a factor of &amp;lt;x&amp;gt; (range -4 to 4)&lt;br /&gt;
 W(&amp;lt;x&amp;gt;) - Adjust the both heard and spoken volumes by a factor of &amp;lt;x&amp;gt;&lt;br /&gt;
         (range -4 to 4)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;command&amp;gt; will be executed when the recording is over Any strings matching ^{X} will be unescaped to ${X}. All variables will be evaluated at the time MixMonitor is called. The variable MIXMONITOR_FILENAME will contain the filename used to record.&lt;br /&gt;
&lt;br /&gt;
==Monitor==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Monitor a channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Monitor([file_format[:urlbase]|[fname_base]|[options]]):&lt;br /&gt;
&lt;br /&gt;
Used to start monitoring a channel. The channel's input and output voice packets are logged to files until the channel hangs up or monitoring is stopped by the StopMonitor application.&lt;br /&gt;
  file_format           optional, if not set, defaults to &amp;quot;wav&amp;quot;&lt;br /&gt;
  fname_base            if set, changes the filename used to the one specified.&lt;br /&gt;
  options:&lt;br /&gt;
    m   - when the recording ends mix the two leg files into one and&lt;br /&gt;
          delete the two leg files.  If the variable MONITOR_EXEC is set, the&lt;br /&gt;
          application referenced in it will be executed instead of&lt;br /&gt;
          soxmix and the raw leg files will NOT be deleted automatically.&lt;br /&gt;
          soxmix or MONITOR_EXEC is handed 3 arguments, the two leg files&lt;br /&gt;
          and a target mixed file name which is the same as the leg file names&lt;br /&gt;
          only without the in/out designator.&lt;br /&gt;
          If MONITOR_EXEC_ARGS is set, the contents will be passed on as&lt;br /&gt;
          additional arguements to MONITOR_EXEC&lt;br /&gt;
          Both MONITOR_EXEC and the Mix flag can be set from the&lt;br /&gt;
          administrator interface&lt;br /&gt;
    b   - Don't begin recording unless a call is bridged to another channel&lt;br /&gt;
&lt;br /&gt;
Returns -1 if monitor files can't be opened or if the channel is already monitored, otherwise 0.&lt;br /&gt;
&lt;br /&gt;
==MP3Player==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play an MP3 file or stream&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MP3Player(location) Executes mpg123 to play the given location, which typically would be a filename or a URL. User can exit by pressing any key on the dialpad, or by hanging up.&lt;br /&gt;
&lt;br /&gt;
==MusicOnHold==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play Music On Hold indefinitely&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
MusicOnHold(class):&lt;br /&gt;
&lt;br /&gt;
Plays hold music specified by class. If omitted, the default music source for the channel will be used. Set the default class with the SetMusicOnHold() application. Returns -1 on hangup.&lt;br /&gt;
Never returns otherwise.&lt;br /&gt;
&lt;br /&gt;
==NBScat==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play an NBS local stream&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
NBScat: Executes nbscat to listen to the local NBS stream. User can exit by pressing any key&lt;br /&gt;
&lt;br /&gt;
==NoCDR==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Tell Asterisk to not maintain a CDR for the current call&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
NoCDR(): This application will tell Asterisk not to maintain a CDR for the current call.&lt;br /&gt;
&lt;br /&gt;
==NoOp==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Do Nothing&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
NoOp(): This applicatiion does nothing. However, it is useful for debugging purposes. Any text that is provided as arguments to this application can be viewed at the Asterisk CLI. This method can be used to see the evaluations of variables or functions without having any effect.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/G-L</id>
		<title>G-L</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/G-L"/>
				<updated>2007-09-12T05:26:29Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* HasNewVoicemail */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Index G-L of Asterisk Applications&lt;br /&gt;
==GetCPEID==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Get ADSI CPE ID&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
GetCPEID: Obtains and displays ADSI CPE ID and other information in order to properly setup zapata.conf for on-hook operations.&lt;br /&gt;
&lt;br /&gt;
==GetGroupCount==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Get the channel count of a group&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage: GetGroupCount([groupname][@category])&lt;br /&gt;
&lt;br /&gt;
Calculates the group count for the specified group, or uses the current channel's group if not specifed (and non-empty). Stores result in GROUPCOUNT. Note: This application has been deprecated, please use the function&lt;br /&gt;
GROUP_COUNT.&lt;br /&gt;
&lt;br /&gt;
==GetGroupMatchCount==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Get the channel count of all groups that match a pattern&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage: GetGroupMatchCount(groupmatch[@category])&lt;br /&gt;
&lt;br /&gt;
Calculates the group count for all groups that match the specified pattern. Uses standard regular expression matching (see regex(7)). Stores result in GROUPCOUNT.  Always returns 0.&lt;br /&gt;
Note: This application has been deprecated, please use the function GROUP_MATCH_COUNT.&lt;br /&gt;
&lt;br /&gt;
==Gosub==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Jump to label, saving return address&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Gosub([context|]exten|]priority)  Jumps to the label specified, saving the return address.&lt;br /&gt;
&lt;br /&gt;
==GosubIf==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Jump to label, saving return address&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
GosubIf(condition?labeliftrue[:labeliffalse])&lt;br /&gt;
If the condition is true, then jump to labeliftrue.  If false, jumps to labeliffalse, if specified.  In either case, a jump saves the return point in the dialplan, to be returned to with a Return.&lt;br /&gt;
&lt;br /&gt;
==GotoIfTime==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Conditional Goto based on the current time&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
GotoIfTime(&amp;lt;times&amp;gt;|&amp;lt;weekdays&amp;gt;|&amp;lt;mdays&amp;gt;|&amp;lt;months&amp;gt;?[context|]exten|]priority):&lt;br /&gt;
&lt;br /&gt;
This application will set the context, extension, and priority in the channel structure if the current time matches the given time specification. Otherwise, nothing is done. Further information on the time specification can be found in examples illustrating how to do time-based context includes in the dialplan. If the target jump location is bogus, Asterisk will respond as outlined in Goto.&lt;br /&gt;
&lt;br /&gt;
==Goto==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Jump to a particular priority, extension, or context&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Goto([context|]extension|]priority):&lt;br /&gt;
&lt;br /&gt;
This application will set the current context, extension, and priority in the channel structure. After it completes, the pbx engine will continue dialplan execution at the specified location. If no specific extension, or extension and context, are specified, then this application will just set the specified priority of the current extension.&lt;br /&gt;
&lt;br /&gt;
At least a priority is required as an argument, or the goto will return a -1, and the channel and call will be terminated. If the location that is put into the channel information is bogus, and asterisk cannot find that location in the dialplan, then the execution engine will try to find and execute the code in the 'i' (invalid) extension in the current context.&lt;br /&gt;
&lt;br /&gt;
If that does not exist, it will try to execute the 'h' extension. If either or neither the 'h' or 'i' extensions have been defined, the channel is hung up, and the execution of instructions on the channel is terminated.&lt;br /&gt;
&lt;br /&gt;
What this means is that, for example, you specify a context that does not exist, then it will not be possible to find the 'h' or 'i' extensions, and the call will terminate!&lt;br /&gt;
&lt;br /&gt;
==GotoIf==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Conditional goto&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
GotoIf(condition?[labeliftrue]:[labeliffalse]):&lt;br /&gt;
&lt;br /&gt;
This application will set the current context, extension, and priority in the channel structure based on the evaluation of the given condition. After this application completes, the pbx engine will continue dialplan execution at the specified location in the dialplan. The channel will continue at 'labeliftrue' if the condition is true, or 'labeliffalse' if the condition is false. The labels are specified with the same syntax as used within the Goto application.  If the label chosen by the condition is omitted, no jump is performed, and the execution passes to the next instruction. If the target location is bogus, and does not exist, the execution engine will try to find and execute the code in the 'i' (invalid) extension in the current context. If that does not exist, it will try to execute the 'h' extension. If either or neither the 'h' or 'i' extensions have been defined, the channel is hung up, and the execution of instructions on the channel is terminated. Remember that this command can set the current context, and if the context specified does not exist, then it will not be able to find any 'h' or 'i' extensions there,&lt;br /&gt;
and the channel and call will both be terminated!&lt;br /&gt;
&lt;br /&gt;
==Hangup==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Hang up the calling channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Hangup(): This application will hang up the calling channel.&lt;br /&gt;
&lt;br /&gt;
==HasNewVoicemail==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Conditionally branches to priority + 101 with the right options set&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
HasNewVoicemail(vmbox[/folder][@context][|varname[|options]])&lt;br /&gt;
&lt;br /&gt;
Assumes folder 'INBOX' if folder is not specified. Optionally sets &amp;lt;varname&amp;gt; to the number of messages&lt;br /&gt;
in that folder. The option string may contain zero of the following character:&lt;br /&gt;
'j' -- jump to priority n+101, if there is new voicemail in folder 'folder' or INBOX&lt;br /&gt;
This application sets the following channel variable upon completion:&lt;br /&gt;
HASVMSTATUS&lt;br /&gt;
The result of the new voicemail check returned as a text string as follows&lt;br /&gt;
&amp;lt;# of messages in the folder, 0 for NONE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==IAX2Provision==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Provision a calling IAX2 with a given template&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
IAX2Provision([template]): Provisions the calling IAX2 (assuming the calling entity is in fact an IAX2) with the given template or default if one is not specified.  Returns -1 on error or 0 on success.&lt;br /&gt;
&lt;br /&gt;
==ICES==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Encode and stream using 'ices'&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ICES(config.xml) Streams to an icecast server using ices (available separately).  A configuration file must be supplied for ices (see examples/asterisk-ices.conf).&lt;br /&gt;
&lt;br /&gt;
==ImportVar==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Import a variable from a channel into a new variable&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ImportVar(newvar=channelname|variable): This application imports a variable from the specified channel (as opposed to the current one) and stores it as a variable in the current channel (the channel that is calling this application). Variables created by this application have the same inheritance properties as those created with the Set application. See the documentation for Set for more information.&lt;br /&gt;
&lt;br /&gt;
==LookupBlacklist==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Look up Caller*ID name/number from blacklist database&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
LookupBlacklist(options): Looks up the Caller*ID number on the active channel in the Asterisk database (family 'blacklist'). The option string may contain the following character:&lt;br /&gt;
'j' -- jump to n+101 priority if the number/name is found in the blacklist&lt;br /&gt;
This application sets the following channel variable upon completion:&lt;br /&gt;
LOOKUPBLSTATUS&lt;br /&gt;
The status of the Blacklist lookup as a text string, one of&lt;br /&gt;
FOUND | NOTFOUND&lt;br /&gt;
 Example: exten =&amp;gt; 1234,1,LookupBlacklist()&lt;br /&gt;
&lt;br /&gt;
==LookupCIDName==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Look up CallerID Name from local database&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
LookupCIDName: Looks up the Caller*ID number on the active channel in the Asterisk database (family 'cidname') and sets the Caller*ID name.  Does nothing if no Caller*ID was received on the channel.  This is useful if you do not subscribe to Caller*ID name delivery, or if you want to change the names on some incoming calls.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/D-F</id>
		<title>D-F</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/D-F"/>
				<updated>2007-09-12T04:46:21Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* ExternalIVR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Index D-F of Asterisk Applications&lt;br /&gt;
==DateTime==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Says a specified time in a custom format&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DateTime([unixtime][|[timezone][|format]])&lt;br /&gt;
  unixtime: time, in seconds since Jan 1, 1970.  May be negative.&lt;br /&gt;
              defaults to now.&lt;br /&gt;
  timezone: timezone, see /usr/share/zoneinfo for a list.&lt;br /&gt;
              defaults to machine default.&lt;br /&gt;
  format:   a format the time is to be said in.  See voicemail.conf.&lt;br /&gt;
              defaults to &amp;quot;ABdY 'digits/at' IMp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==DBdel==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Delete a key from the database&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DBdel(family/key):&lt;br /&gt;
&lt;br /&gt;
This application will delete a key from the Asterisk database.&lt;br /&gt;
&lt;br /&gt;
==DBdeltree==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Delete a family or keytree from the database&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DBdeltree(family[/keytree]):&lt;br /&gt;
&lt;br /&gt;
This application will delete a family or keytree from the Asterisk database&lt;br /&gt;
&lt;br /&gt;
==DBget==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Retrieve a value from the database&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DBget(varname=family/key[|options]):&lt;br /&gt;
&lt;br /&gt;
This application will retrieve a value from the Asterisk database and store it in the given variable.&lt;br /&gt;
  Options:&lt;br /&gt;
    j - Jump to priority n+101 if the requested family/key isn't found.&lt;br /&gt;
  This application sets the following channel variable upon completion:&lt;br /&gt;
    DBGETSTATUS - This variable will contain the status of the attempt&lt;br /&gt;
                  FOUND | NOTFOUND&lt;br /&gt;
  This application has been deprecated in favor of the DB function.&lt;br /&gt;
&lt;br /&gt;
==DBput==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Store a value in the database&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DBput(family/key=value):&lt;br /&gt;
&lt;br /&gt;
This application will store the given value in the specified location in the Asterisk database.&lt;br /&gt;
This application has been deprecated in favor of the DB function.&lt;br /&gt;
&lt;br /&gt;
==DeadAGI==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Executes AGI on a hungup channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
[E|Dead]AGI(command|args):&lt;br /&gt;
&lt;br /&gt;
Executes an Asterisk Gateway Interface compliant program on a channel. AGI allows Asterisk to launch external programs written in any language to control a telephony channel, play audio, read DTMF digits, etc. by communicating with the AGI protocol on stdin and stdout.&amp;lt;br&amp;gt;&lt;br /&gt;
Returns -1 on hangup (except for DeadAGI) or if application requested hangup, or 0 on non-hangup exit.&lt;br /&gt;
Using 'EAGI' provides enhanced AGI, with incoming audio available out of band on file descriptor 3&lt;br /&gt;
 Use the CLI command 'show agi' to list available agi commands&lt;br /&gt;
&lt;br /&gt;
==Dial==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Place a call and connect to the current channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Dial(Technology/resource[&amp;amp;Tech2/resource2...][|timeout][|options][|URL]):&lt;br /&gt;
&lt;br /&gt;
This application will place calls to one or more specified channels. As soon as one of the requested channels answers, the originating channel will be answered, if it has not already been answered. These two channels will then be active in a bridged call. All other channels that were requested will then&lt;br /&gt;
be hung up. Unless there is a timeout specified, the Dial application will wait indefinitely until one of the called channels answers, the user hangs up, or if all of the called channels are busy or unavailable. Dialplan executing will continue if no requested channels can be called, or if the timeout expires.&lt;br /&gt;
&lt;br /&gt;
  This application sets the following channel variables upon completion:&lt;br /&gt;
    DIALEDTIME   - This is the time from dialing a channel until when it&lt;br /&gt;
                   is disconnected.&lt;br /&gt;
    ANSWEREDTIME - This is the amount of time for actual call.&lt;br /&gt;
    DIALSTATUS   - This is the status of the call:&lt;br /&gt;
                   CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL&lt;br /&gt;
                   DONTCALL | TORTURE | INVALIDARGS&lt;br /&gt;
&lt;br /&gt;
For the Privacy and Screening Modes, the DIALSTATUS variable will be set to DONTCALL if the called party chooses to send the calling party to the 'Go Away' script. The DIALSTATUS variable will be set to TORTURE if the called party wants to send the caller to the 'torture' script. This application will report normal termination if the originating channel hangs up, or if the call is bridged and either of the parties in the bridge ends the call.&lt;br /&gt;
&lt;br /&gt;
The optional URL will be sent to the called party if the channel supports it.&lt;br /&gt;
If the OUTBOUND_GROUP variable is set, all peer channels created by this application will be put into that group (as in Set(GROUP()=...).&lt;br /&gt;
&lt;br /&gt;
If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP,&lt;br /&gt;
however, the variable will be unset after use.&lt;br /&gt;
&lt;br /&gt;
  Options:&lt;br /&gt;
    A(x) - Play an announcement to the called party, using 'x' as the file.&lt;br /&gt;
    C    - Reset the CDR for this call.&lt;br /&gt;
    d    - Allow the calling user to dial a 1 digit extension while waiting for&lt;br /&gt;
           a call to be answered. Exit to that extension if it exists in the&lt;br /&gt;
           current context, or the context defined in the EXITCONTEXT variable,&lt;br /&gt;
           if it exists.&lt;br /&gt;
    D([called][:calling]) - Send the specified DTMF strings *after* the called&lt;br /&gt;
           party has answered, but before the call gets bridged. The 'called'&lt;br /&gt;
           DTMF string is sent to the called party, and the 'calling' DTMF&lt;br /&gt;
           string is sent to the calling party. Both parameters can be used&lt;br /&gt;
           alone.&lt;br /&gt;
    f    - Force the callerid of the *calling* channel to be set as the&lt;br /&gt;
           extension associated with the channel using a dialplan 'hint'.&lt;br /&gt;
           For example, some PSTNs do not allow CallerID to be set to anything&lt;br /&gt;
           other than the number assigned to the caller.&lt;br /&gt;
    g    - Proceed with dialplan execution at the current extension if the&lt;br /&gt;
           destination channel hangs up.&lt;br /&gt;
    G(context^exten^pri) - If the call is answered, transfer the calling party to&lt;br /&gt;
           the specified priority and the called party to the specified priority+1.&lt;br /&gt;
           Optionally, an extension, or extension and context may be specified.&lt;br /&gt;
           Otherwise, the current extension is used. You cannot use any additional&lt;br /&gt;
           action post answer options in conjunction with this option.&lt;br /&gt;
    h    - Allow the called party to hang up by sending the '*' DTMF digit.&lt;br /&gt;
    H    - Allow the calling party to hang up by hitting the '*' DTMF digit.&lt;br /&gt;
    j    - Jump to priority n+101 if all of the requested channels were busy.&lt;br /&gt;
    L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are&lt;br /&gt;
           left. Repeat the warning every 'z' ms. The following special&lt;br /&gt;
           variables can be used with this option:&lt;br /&gt;
           * LIMIT_PLAYAUDIO_CALLER   yes|no (default yes)&lt;br /&gt;
                                      Play sounds to the caller.&lt;br /&gt;
           * LIMIT_PLAYAUDIO_CALLEE   yes|no&lt;br /&gt;
                                      Play sounds to the callee.&lt;br /&gt;
           * LIMIT_TIMEOUT_FILE       File to play when time is up.&lt;br /&gt;
           * LIMIT_CONNECT_FILE       File to play when call begins.&lt;br /&gt;
           * LIMIT_WARNING_FILE       File to play as warning if 'y' is defined.&lt;br /&gt;
                                      The default is to say the time remaining.&lt;br /&gt;
    m([class]) - Provide hold music to the calling party until a requested&lt;br /&gt;
           channel answers. A specific MusicOnHold class can be&lt;br /&gt;
           specified.&lt;br /&gt;
    M(x[^arg]) - Execute the Macro for the *called* channel before connecting&lt;br /&gt;
           to the calling channel. Arguments can be specified to the Macro&lt;br /&gt;
           using '^' as a delimeter. The Macro can set the variable&lt;br /&gt;
           MACRO_RESULT to specify the following actions after the Macro is&lt;br /&gt;
           finished executing.&lt;br /&gt;
           * ABORT        Hangup both legs of the call.&lt;br /&gt;
           * CONGESTION   Behave as if line congestion was encountered.&lt;br /&gt;
           * BUSY         Behave as if a busy signal was encountered. This will also&lt;br /&gt;
                          have the application jump to priority n+101 if the&lt;br /&gt;
                          'j' option is set.&lt;br /&gt;
           * CONTINUE     Hangup the called party and allow the calling party&lt;br /&gt;
                          to continue dialplan execution at the next priority.&lt;br /&gt;
           * GOTO:&amp;lt;context&amp;gt;^&amp;lt;exten&amp;gt;^&amp;lt;priority&amp;gt; - Transfer the call to the&lt;br /&gt;
                          specified priority. Optionally, an extension, or&lt;br /&gt;
                          extension and priority can be specified.&lt;br /&gt;
           You cannot use any additional action post answer options in conjunction&lt;br /&gt;
           with this option.&lt;br /&gt;
    n    - This option is a modifier for the screen/privacy mode. It specifies&lt;br /&gt;
           that no introductions are to be saved in the priv-callerintros&lt;br /&gt;
           directory.&lt;br /&gt;
    N    - This option is a modifier for the screen/privacy mode. It specifies&lt;br /&gt;
           that if callerID is present, do not screen the call.&lt;br /&gt;
    o    - Specify that the CallerID that was present on the *calling* channel&lt;br /&gt;
           be set as the CallerID on the *called* channel. This was the&lt;br /&gt;
           behavior of Asterisk 1.0 and earlier.&lt;br /&gt;
    p    - This option enables screening mode. This is basically Privacy mode&lt;br /&gt;
           without memory.&lt;br /&gt;
    P([x]) - Enable privacy mode. Use 'x' as the family/key in the database if&lt;br /&gt;
           it is provided. The current extension is used if a database&lt;br /&gt;
           family/key is not specified.&lt;br /&gt;
    r    - Indicate ringing to the calling party. Pass no audio to the calling&lt;br /&gt;
           party until the called channel has answered.&lt;br /&gt;
    S(x) - Hang up the call after 'x' seconds *after* the called party has&lt;br /&gt;
           answered the call.&lt;br /&gt;
    t    - Allow the called party to transfer the calling party by sending the&lt;br /&gt;
           DTMF sequence defined in features.conf.&lt;br /&gt;
    T    - Allow the calling party to transfer the called party by sending the&lt;br /&gt;
           DTMF sequence defined in features.conf.&lt;br /&gt;
    w    - Allow the called party to enable recording of the call by sending&lt;br /&gt;
           the DTMF sequence defined for one-touch recording in features.conf.&lt;br /&gt;
    W    - Allow the calling party to enable recording of the call by sending&lt;br /&gt;
           the DTMF sequence defined for one-touch recording in features.conf.&lt;br /&gt;
&lt;br /&gt;
==Dictate==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Virtual Dictation Machine&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Dictate([&amp;lt;base_dir&amp;gt;])&lt;br /&gt;
Start dictation machine using optional base dir for files.&lt;br /&gt;
&lt;br /&gt;
==DigitTimeout==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set maximum timeout between digits&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DigitTimeout(seconds): Set the maximum amount of time permitted between digits when the user is typing in an extension. When this timeout expires, after the user has started to type in an extension, the extension will be considered complete, and will be interpreted. Note that if an extension typed in is valid, it will not have to timeout to be tested, so typically at the expiry of this timeout, the extension will be considered invalid (and thus control would be passed to the 'i' extension, or if it doesn't exist the call would be terminated). The default timeout is 5 seconds. DigitTimeout has been deprecated in favor of Set(TIMEOUT(digit)=timeout)&lt;br /&gt;
&lt;br /&gt;
==Directory==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Provide directory of voicemail extensions&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Directory(vm-context[|dial-context[|options]]):&lt;br /&gt;
&lt;br /&gt;
This application will present the calling channel with a directory of extensions from which they can search by name. The list of names and corresponding extensions is retrieved from the voicemail configuration file, voicemail.conf. This application will immediately exit if one of the following DTMF digits are received and the extension to jump to exists:&lt;br /&gt;
    0 - Jump to the 'o' extension, if it exists.&lt;br /&gt;
    * - Jump to the 'a' extension, if it exists.&lt;br /&gt;
  Parameters:&lt;br /&gt;
    vm-context   - This is the context within voicemail.conf to use for the&lt;br /&gt;
                   Directory.&lt;br /&gt;
    dial-context - This is the dialplan context to use when looking for an&lt;br /&gt;
                   extension that the user has selected, or when jumping to the&lt;br /&gt;
                   'o' or 'a' extension.&lt;br /&gt;
  Options:&lt;br /&gt;
    f - Allow the caller to enter the first name of a user in the directory&lt;br /&gt;
        instead of using the last name.&lt;br /&gt;
&lt;br /&gt;
==DISA==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
DISA (Direct Inward System Access)&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DISA(&amp;lt;numeric passcode&amp;gt;[|&amp;lt;context&amp;gt;]) or disa(&amp;lt;filename&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
The DISA, Direct Inward System Access, application allows someone from outside the telephone switch (PBX) to obtain an &amp;quot;internal&amp;quot; system dialtone and to place calls from it as if they were placing a call from&lt;br /&gt;
within the switch. DISA plays a dialtone. The user enters their numeric passcode, followed by the pound sign (#). If the passcode is correct, the user is then given system dialtone on which a call may be placed. Obviously, this type of access has SERIOUS security implications, and GREAT care must be taken NOT to compromise your security.&lt;br /&gt;
&lt;br /&gt;
There is a possibility of accessing DISA without password.&amp;lt;br&amp;gt;&lt;br /&gt;
Simply exchange your password with &amp;quot;no-password&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
    Example: exten =&amp;gt; s,1,DISA(no-password|local)&lt;br /&gt;
&lt;br /&gt;
Be aware that using this compromises the security of your PBX.&lt;br /&gt;
&lt;br /&gt;
The arguments to this application (in extensions.conf) allow either specification of a single global passcode (that everyone uses), or individual passcodes contained in a file. It also allow specification&lt;br /&gt;
of the context on which the user will be dialing. If no context is specified, the DISA application defaults the context to &amp;quot;disa&amp;quot;. Presumably a normal system will have a special context set up for DISA use with some or a lot of restrictions.&lt;br /&gt;
&lt;br /&gt;
The file that contains the passcodes (if used) allows specification of either just a passcode (defaulting to the &amp;quot;disa&amp;quot; context, or passcode|context on each line of the file. The file may contain blank lines, or comments starting with &amp;quot;#&amp;quot; or &amp;quot;;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In addition, the above arguments may have |new-callerid-string appended to them, to specify a new (different) callerid to be used for this call, for&lt;br /&gt;
  example: numeric-passcode|context|&amp;quot;My Phone&amp;quot; &amp;lt;(234) 123-4567&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
  full-pathname-of-passcode-file|&amp;quot;My Phone&amp;quot; &amp;lt;(234) 123-4567&amp;gt;&lt;br /&gt;
Last but not least, |mailbox[@context] may be appended, which will cause a stutter-dialtone (indication &amp;quot;dialrecall&amp;quot;) to be used, if the specified mailbox contains any new messages, for example:&lt;br /&gt;
  numeric-passcode|context||1234 (w/a changing callerid)&lt;br /&gt;
Note that in the case of specifying the numeric-passcode, the context must be specified if the callerid is specified also.&lt;br /&gt;
&lt;br /&gt;
If login is successful, the application looks up the dialed number in the specified (or default) context, and executes it if found. If the user enters an invalid extension and extension &amp;quot;i&amp;quot; (invalid) exists in the context, it will be used.&lt;br /&gt;
&lt;br /&gt;
==DumpChan==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Dump Info About The Calling Channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DumpChan([&amp;lt;min_verbose_level&amp;gt;])&lt;br /&gt;
&lt;br /&gt;
Displays information on channel and listing of all channel variables. If min_verbose_level is specified, output is only displayed when the verbose level is currently set to that number or greater.&lt;br /&gt;
&lt;br /&gt;
==DUNDiLookup==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Look up a number with DUNDi&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
DUNDiLookup(number[|context[|options]])&lt;br /&gt;
&lt;br /&gt;
Looks up a given number in the global context specified or in the reserved 'e164' context if not specified.  Returns -1 if the channel is hungup during the lookup or 0 otherwise. On completion, the variable ${DUNDTECH} and ${DUNDDEST} will contain the technology and destination of the appropriate technology and destination to access the number. If no answer was found, and the priority n + 101 exists, execution will continue at that location. Note that this will only occur if the global priority jumping option is enabled in extensions.conf. If the 'b' option is specified, the internal DUNDi cache will by bypassed.&lt;br /&gt;
&lt;br /&gt;
==EAGI==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Executes an EAGI compliant application&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
[E|Dead]AGI(command|args):&lt;br /&gt;
&lt;br /&gt;
Executes an Asterisk Gateway Interface compliant program on a channel. AGI allows Asterisk to launch external programs written in any language to control a telephony channel, play audio, read DTMF digits, etc. by communicating with the AGI protocol on stdin and stdout.&lt;br /&gt;
&lt;br /&gt;
Returns -1 on hangup (except for DeadAGI) or if application requested hangup, or 0 on non-hangup exit.&lt;br /&gt;
Using 'EAGI' provides enhanced AGI, with incoming audio available out of band on file descriptor 3&lt;br /&gt;
&lt;br /&gt;
Use the CLI command 'show agi' to list available agi commands&lt;br /&gt;
&lt;br /&gt;
==Echo==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Echo audio read back to the user&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Echo():&lt;br /&gt;
&lt;br /&gt;
Echo audio read from channel back to the channel. User can exit the application by either pressing the '#' key, or hanging up.&lt;br /&gt;
&lt;br /&gt;
==EndWhile==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
End A While Loop&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage:  EndWhile()&lt;br /&gt;
Return to the previous called While&lt;br /&gt;
&lt;br /&gt;
==EnumLookup==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Lookup number in ENUM&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
EnumLookup(exten[|option]):&lt;br /&gt;
&lt;br /&gt;
Looks up an extension via ENUM and sets the variable 'ENUM'. For VoIP URIs this variable will look like 'TECHNOLOGY/URI' with the appropriate technology. Currently, the enumservices SIP, H323, IAX, IAX2 and TEL are recognized.&lt;br /&gt;
&lt;br /&gt;
Returns status in the ENUMSTATUS channel variable:&lt;br /&gt;
    ERROR       Failed to do a lookup&lt;br /&gt;
    &amp;lt;tech&amp;gt;      Technology of the successful lookup: SIP, H323, IAX, IAX2 or TEL&lt;br /&gt;
    BADURI      Got URI Asterisk does not understand.&lt;br /&gt;
  The option string may contain zero or the following character:&lt;br /&gt;
       'j' -- jump to +101 priority if the lookup isn't successful.&lt;br /&gt;
               and jump to +51 priority on a TEL entry.&lt;br /&gt;
&lt;br /&gt;
==Eval==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Evaluates a string&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage: Eval(newvar=somestring)&lt;br /&gt;
&lt;br /&gt;
Normally Asterisk evaluates variables inline. But what if you want to store variable offsets in a database, to be evaluated later?  Eval is the answer, by allowing a string to be evaluated twice in the dialplan, the first time as part of the normal dialplan, and the second using Eval.&lt;br /&gt;
&lt;br /&gt;
==Exec==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Executes internal application&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage: Exec(appname(arguments))&lt;br /&gt;
&lt;br /&gt;
Allows an arbitrary application to be invoked even when not hardcoded into the dialplan. To invoke external applications see the application System. Returns whatever value the app returns or a non-zero value if the app cannot be found.&lt;br /&gt;
&lt;br /&gt;
==ExecIf==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Conditional exec&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage:  ExecIF (&amp;lt;expr&amp;gt;|&amp;lt;app&amp;gt;|&amp;lt;data&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;expr&amp;gt; is true, execute and return the result of &amp;lt;app&amp;gt;(&amp;lt;data&amp;gt;).&lt;br /&gt;
If &amp;lt;expr&amp;gt; is true, but &amp;lt;app&amp;gt; is not found, then the application will return a non-zero value.&lt;br /&gt;
&lt;br /&gt;
==ExecIfTime==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Conditional application execution based on the current time&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ExecIfTime(&amp;lt;times&amp;gt;|&amp;lt;weekdays&amp;gt;|&amp;lt;mdays&amp;gt;|&amp;lt;months&amp;gt;?appname[|appargs]):&lt;br /&gt;
&lt;br /&gt;
This application will execute the specified dialplan application, with optional arguments, if the current time matches the given time specification. Further information on the time speicification can be found in examples illustrating how to do time-based context includes in the dialplan.&lt;br /&gt;
&lt;br /&gt;
==ExternalIVR==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Interfaces with an external IVR application&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ExternalIVR(command[|arg[|arg...]]):&lt;br /&gt;
&lt;br /&gt;
Forks an process to run the supplied command, and starts a generator on the channel. The generator's play list is controlled by the external application, which can add and clear entries via simple commands issued over its stdout. The external application will receive all DTMF events received on the channel, and notification if the channel is hung up. The application will not be forcibly terminated when the channel is hung up.&lt;br /&gt;
&lt;br /&gt;
See doc/README.externalivr for a protocol specification.&lt;br /&gt;
&lt;br /&gt;
==Festival==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Say text to the user&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Festival(text[|intkeys]):&lt;br /&gt;
&lt;br /&gt;
Connect to Festival, send the argument, get back the waveform,play it to the user, allowing any given interrupt keys to immediately terminate and return the value, or 'any' to allow any number back (useful in dialplan)&lt;br /&gt;
&lt;br /&gt;
==Flash==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Flashes a Zap Trunk&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Flash():&lt;br /&gt;
&lt;br /&gt;
Sends a flash on a zap trunk. This is only a hack for people who want to perform transfers and such via AGI and is generally quite useless oths application will only work on Zap trunks.&lt;br /&gt;
&lt;br /&gt;
==ForkCDR==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Forks the Call Data Record&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ForkCDR([options]):&lt;br /&gt;
&lt;br /&gt;
Causes the Call Data Record to fork an additional cdr record starting from the time of the fork call If the option 'v' is passed all cdr variables will be passed along also.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/A-C</id>
		<title>A-C</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/A-C"/>
				<updated>2007-09-12T04:23:55Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* AGI */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Index A-C of Asterisk Applications&lt;br /&gt;
==AbsoluteTimeout==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Set absolute maximum time of call&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
AbsoluteTimeout(seconds):&lt;br /&gt;
&lt;br /&gt;
This application will set the absolute maximum amount of time permitted for a call. A setting of 0 disables the timeout. AbsoluteTimeout has been deprecated in favor of Set(TIMEOUT(absolute)=timeout)&lt;br /&gt;
&lt;br /&gt;
==AddQueueMember==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Dynamically adds queue members&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
AddQueueMember(queuename[|interface[|penalty[|options]]]):&lt;br /&gt;
&lt;br /&gt;
Dynamically adds interface to an existing queue. If the interface is already in the queue and there exists an n+101 priority then it will then jump to this priority. Otherwise it will return an error&lt;br /&gt;
The option string may contain zero or more of the following characters:&lt;br /&gt;
 'j' -- jump to +101 priority when appropriate.&lt;br /&gt;
 This application sets the following channel variable upon completion:&lt;br /&gt;
 AQMSTATUS    The status of the attempt to add a queue member as a text string, one of&lt;br /&gt;
 ADDED | MEMBERALREADY | NOSUCHQUEUE&lt;br /&gt;
 Example: AddQueueMember(techsupport|SIP/3000)&lt;br /&gt;
&lt;br /&gt;
==ADSIProg==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Load Asterisk ADSI Scripts into phone&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ADSIProg(script):&lt;br /&gt;
&lt;br /&gt;
This application programs an ADSI Phone with the given script. If nothing is specified, the default script (asterisk.adsi) is used.&lt;br /&gt;
&lt;br /&gt;
==AgentCallbackLogin==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Call agent callback login&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
AgentCallbackLogin([AgentNo][|[options][|[exten]@context]]):&lt;br /&gt;
&lt;br /&gt;
Asks the agent to login to the system with callback. The agent's callback extension is called (optionally with the specified context). The option string may contain zero or more of the following characters:&lt;br /&gt;
      's' -- silent login - do not announce the login ok segment agent logged in/off&lt;br /&gt;
&lt;br /&gt;
==AgentLogin==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Call agent login&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
AgentLogin([AgentNo][|options]):&lt;br /&gt;
&lt;br /&gt;
Asks the agent to login to the system. Always returns -1. While logged in, the agent can receive calls and will hear a 'beep' when a new call comes in. The agent can dump the call by pressing the star key. The option string may contain zero or more of the following characters:&lt;br /&gt;
&lt;br /&gt;
 's' -- silent login - do not announce the login ok segment after agent logged in/off&lt;br /&gt;
&lt;br /&gt;
==AgentMonitorOutgoing==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Record agent's outgoing call&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
AgentMonitorOutgoing([options]):&lt;br /&gt;
&lt;br /&gt;
Tries to figure out the id of the agent who is placing outgoing call based on comparison of the callerid of the current interface and the global variable placed by the AgentCallbackLogin application. That's why it should be used only with the AgentCallbackLogin app. Uses the monitoring functions in chan_agent instead of Monitor application. That have to be configured in the agents.conf file.&lt;br /&gt;
&lt;br /&gt;
Return value:&amp;lt;br&amp;gt;&lt;br /&gt;
Normally the app returns 0 unless the options are passed. Also if the callerid or the agentid are not specified it'll look for n+101 priority.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
        'd' - make the app return -1 if there is an error condition and there is&lt;br /&gt;
              no extension n+101&lt;br /&gt;
        'c' - change the CDR so that the source of the call is 'Agent/agent_id'&lt;br /&gt;
        'n' - don't generate the warnings when there is no callerid or the&lt;br /&gt;
              agentid is not known.&lt;br /&gt;
             It's handy if you want to have one context for agent and non-agent calls.&lt;br /&gt;
&lt;br /&gt;
==AGI==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Executes an AGI compliant application&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
[E|Dead]AGI(command|args):&lt;br /&gt;
&lt;br /&gt;
Executes an Asterisk Gateway Interface compliant program on a channel. AGI allows Asterisk to launch external programs written in any language to control a telephony channel, play audio, read DTMF digits, etc. by communicating with the AGI protocol on stdin and stdout. Returns -1 on hangup (except for DeadAGI) or if application requested hangup, or 0 on on-hangup exit. Using 'EAGI' provides enhanced AGI, with incoming audio available out of band on file descriptor 3&lt;br /&gt;
&lt;br /&gt;
Use the CLI command 'show agi' to list available agi commands&lt;br /&gt;
&lt;br /&gt;
              answer   Answer channel&lt;br /&gt;
      channel status   Returns status of the connected channel&lt;br /&gt;
        database del   Removes database key/value&lt;br /&gt;
    database deltree   Removes database keytree/value&lt;br /&gt;
        database get   Gets database value&lt;br /&gt;
        database put   Adds/updates database value&lt;br /&gt;
                exec   Executes a given Application&lt;br /&gt;
            get data   Prompts for DTMF on a channel&lt;br /&gt;
   get full variable   Evaluates a channel expression&lt;br /&gt;
          get option   Stream file, prompt for DTMF, with timeout&lt;br /&gt;
        get variable   Gets a channel variable&lt;br /&gt;
              hangup   Hangup the current channel&lt;br /&gt;
                noop   Does nothing&lt;br /&gt;
        receive char   Receives one character from channels supporting it&lt;br /&gt;
        receive text   Receives text from channels supporting it&lt;br /&gt;
         record file   Records to a given file&lt;br /&gt;
           say alpha   Says a given character string&lt;br /&gt;
          say digits   Says a given digit string&lt;br /&gt;
          say number   Says a given number&lt;br /&gt;
        say phonetic   Says a given character string with phonetics&lt;br /&gt;
            say date   Says a given date&lt;br /&gt;
            say time   Says a given time&lt;br /&gt;
        say datetime   Says a given time as specfied by the format given&lt;br /&gt;
          send image   Sends images to channels supporting it&lt;br /&gt;
           send text   Sends text to channels supporting it&lt;br /&gt;
      set autohangup   Autohangup channel in some time&lt;br /&gt;
        set callerid   Sets callerid for the current channel&lt;br /&gt;
         set context   Sets channel context&lt;br /&gt;
       set extension   Changes channel extension&lt;br /&gt;
           set music   Enable/Disable Music on hold generator&lt;br /&gt;
        set priority   Set channel dialplan priority&lt;br /&gt;
        set variable   Sets a channel variable&lt;br /&gt;
         stream file   Sends audio file on channel&lt;br /&gt;
 control stream file   Sends audio file on channel and allows the listner to control the stream&lt;br /&gt;
            tdd mode   Toggles TDD mode (for the deaf)&lt;br /&gt;
             verbose   Logs a message to the asterisk verbose log&lt;br /&gt;
      wait for digit   Waits for a digit to be pressed&lt;br /&gt;
&lt;br /&gt;
==AlarmReceiver==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Provide support for receving alarm reports from a burglar or fire alarm panel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
AlarmReceiver():&lt;br /&gt;
&lt;br /&gt;
Only 1 signalling format is supported at this time: Ademco Contact ID. This application should be called whenever there is an alarm panel calling in to dump its events. The application will handshake with the alarm panel, and receive events, validate them, handshake them, and store them until the panel hangs up. Once the panel hangs up, the application will run the system command specified by the eventcmd setting in alarmreceiver.conf and pipe the events to the standard input of the application. The configuration file also contains settings for DTMF timing, and for the loudness of the acknowledgement tones.&lt;br /&gt;
&lt;br /&gt;
==Answer==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Answer a channel if ringing&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Answer([delay]):&lt;br /&gt;
&lt;br /&gt;
If the call has not been answered, this application will answer it. Otherwise, it has no effect on the call. If a delay is specified, Asterisk will wait this number of milliseconds before returning to the dialplan after answering the call.&lt;br /&gt;
&lt;br /&gt;
==AppendCDRUserField==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Append to the CDR user field&lt;br /&gt;
&lt;br /&gt;
'''[Description'''&lt;br /&gt;
&lt;br /&gt;
AppendCDRUserField(value):&lt;br /&gt;
&lt;br /&gt;
Append value to the CDR user field The Call Data Record (CDR) user field is an extra field you can use for data not stored anywhere else in the record. CDR records can be used for billing or storing other arbitrary data (I.E. telephone survey responses) Also see SetCDRUserField().&lt;br /&gt;
&lt;br /&gt;
==Authenticate==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Authenticate a user&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Authenticate(password[|options]):&lt;br /&gt;
&lt;br /&gt;
This application asks the caller to enter a given password in order to continue dialplan execution. If the password begins with the '/' character, it is interpreted as a file which contains a list of valid passwords, listed 1 password per line in the file. When using a database key, the value associated with the key can be anything. Users have three attempts to authenticate before the channel is hung up. If the passsword is invalid, the 'j' option is specified, and priority n+101 exists, dialplan execution will continnue at this location.&lt;br /&gt;
  Options:&lt;br /&gt;
     a - Set the channels' account code to the password that is entered&lt;br /&gt;
     d - Interpret the given path as database key, not a literal file&lt;br /&gt;
     j - Support jumping to n+101 if authentication fails&lt;br /&gt;
     m - Interpret the given path as a file which contains a list of account&lt;br /&gt;
         codes and password hashes delimited with ':', listed one per line in&lt;br /&gt;
         the file. When one of the passwords is matched, the channel will have&lt;br /&gt;
         its account code set to the corresponding account code in the file.&lt;br /&gt;
     r - Remove the database key upon successful entry (valid with 'd' only)&lt;br /&gt;
&lt;br /&gt;
==BackGround==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play a file while awaiting extension&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Background(filename1[&amp;amp;filename2...][|options[|langoverride][|context]]):&lt;br /&gt;
&lt;br /&gt;
This application will play the given list of files while waiting for an extension to be dialed by the calling channel. To continue waiting for digits after this application has finished playing files, the WaitExten application should be used. The 'langoverride' option explicity specifies which language to attempt to use for the requested sound files. If a 'context' is specified, this is the dialplan context that this application will use when exiting to a dialed extension.  If one of the requested sound files does not exist, call processing will be terminated.&lt;br /&gt;
  Options:&lt;br /&gt;
    s - causes the playback of the message to be skipped&lt;br /&gt;
        if the channel is not in the 'up' state (i.e. it&lt;br /&gt;
        hasn't been answered yet.) If this happens, the&lt;br /&gt;
        application will return immediately.&lt;br /&gt;
    n - don't answer the channel before playing the files&lt;br /&gt;
    m - only break if a digit hit matches a one digit&lt;br /&gt;
          extension in the destination context&lt;br /&gt;
&lt;br /&gt;
==BackgroundDetect==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Background a file with talk detect&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
  BackgroundDetect(filename[|sil[|min|[max]]]):&lt;br /&gt;
&lt;br /&gt;
Plays back a given filename, waiting for interruption from a given digit (the digit must&lt;br /&gt;
start the beginning of a valid extension, or it will be ignored). During the playback of the file, audio is monitored in the receive direction, and if a period of non-silence which is greater than 'min' ms&lt;br /&gt;
yet less than 'max' ms is followed by silence for at least 'sil' ms then the audio playback is aborted and processing jumps to the 'talk' extension if available.  If unspecified, sil, min, and max default to 1000, 100, and infinity respectively.&lt;br /&gt;
&lt;br /&gt;
==Busy==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Indicate the Busy condition&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Busy([timeout]):&lt;br /&gt;
&lt;br /&gt;
This application will indicate the busy condition to the calling channel. If the optional timeout is specified, the calling channel will be hung up after the specified number of seconds. Otherwise, this application will wait until the calling channel hangs up.&lt;br /&gt;
&lt;br /&gt;
==ChangeMonitor==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Change monitoring filename of a channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ChangeMonitor(filename_base)&lt;br /&gt;
&lt;br /&gt;
Changes monitoring filename of a channel. Has no effect if the channel is not monitored The argument is the new filename base to use for monitoring this channel.&lt;br /&gt;
&lt;br /&gt;
==ChanIsAvail==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Check channel availability&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ChanIsAvail(Technology/resource[&amp;amp;Technology2/resource2...][|options]):&lt;br /&gt;
&lt;br /&gt;
This application will check to see if any of the specified channels are available.&amp;lt;br&amp;gt;&lt;br /&gt;
The following variables will be set by this application:&lt;br /&gt;
  ${AVAILCHAN}     - the name of the available channel, if one exists&lt;br /&gt;
  ${AVAILORIGCHAN} - the canonical channel name that was used to create the channel&lt;br /&gt;
  ${AVAILSTATUS}   - the status code for the available channel&lt;br /&gt;
  Options:&lt;br /&gt;
    s - Consider the channel unavailable if the channel is in use at all&lt;br /&gt;
    j - Support jumping to priority n+101 if no channel is available&lt;br /&gt;
&lt;br /&gt;
==ChanSpy==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Listen to the audio of an active channel&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ChanSpy([chanprefix][|options]):&lt;br /&gt;
&lt;br /&gt;
This application is used to listen to the audio from an active Asterisk channel. This includes the audio coming in and out of the channel being spied on. If the 'chanprefix' parameter is specified, only channels beginning with this string will be spied upon.&amp;lt;br&amp;gt;&lt;br /&gt;
While Spying, the following actions may be performed:&lt;br /&gt;
    - Dialing # cycles the volume level.&lt;br /&gt;
    - Dialing * will stop spying and look for another channel to spy on.&lt;br /&gt;
    - Dialing a series of digits followed by # builds a channel name to append&lt;br /&gt;
      to 'chanprefix'. For example, executing ChanSpy(Agent) and then dialing&lt;br /&gt;
      the digits '1234#' while spying will begin spying on the channel,&lt;br /&gt;
      'Agent/1234'.&lt;br /&gt;
  Options:&lt;br /&gt;
    b - Only spy on channels involved in a bridged call.&lt;br /&gt;
    g(grp) - Match only channels where their ${SPYGROUP} variable is set to&lt;br /&gt;
             'grp'.&lt;br /&gt;
    q - Don't play a beep when beginning to spy on a channel.&lt;br /&gt;
    r[(basename)] - Record the session to the monitor spool directory. An&lt;br /&gt;
                    optional base for the filename may be specified. The&lt;br /&gt;
                    default is 'chanspy'.&lt;br /&gt;
    v([value]) - Adjust the initial volume in the range from -4 to 4. A&lt;br /&gt;
                 negative value refers to a quieter setting.&lt;br /&gt;
&lt;br /&gt;
==CheckGroup==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Check the channel count of a group against a limit&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Usage: CheckGroup(max[@category][|options])&lt;br /&gt;
&lt;br /&gt;
Checks that the current number of total channels in the current channel's group does not exceed 'max'.  If the number does not exceed 'max', we continue to the next step. The option string may contain zero of the following character:&lt;br /&gt;
      'j' -- jump to n+101 priority if the number does in fact exceed max,&lt;br /&gt;
             and priority n+101 exists. Execuation then continues at that&lt;br /&gt;
             step, otherwise -1 is returned.&lt;br /&gt;
  This application sets the following channel variable upon successful completion:&lt;br /&gt;
        CHECKGROUPSTATUS  The status of the check that the current channel's&lt;br /&gt;
                         group does not exceed 'max'. It's value is one of&lt;br /&gt;
                OK | OVERMAX&lt;br /&gt;
&lt;br /&gt;
==Congestion==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Indicate the Congestion condition&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Congestion([timeout]):&lt;br /&gt;
&lt;br /&gt;
This application will indicate the congenstion condition to the calling channel. If the optional timeout is specified, the calling channel will be hung up after the specified number of seconds. Otherwise, this application will wait until the calling channel hangs up.&lt;br /&gt;
&lt;br /&gt;
==ControlPlayback==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Play a file with fast forward and rewind&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
ControlPlayback(file[|skipms[|ff[|rew[|stop[|pause[|restart|options]]]]]]]):&lt;br /&gt;
&lt;br /&gt;
This application will play back the given filename.&amp;lt;br&amp;gt;&lt;br /&gt;
By default, the '*' key can be used to rewind, and the '#' key can be used to fast-forward.&lt;br /&gt;
 Parameters:&lt;br /&gt;
  skipms  - This is number of milliseconds to skip when rewinding or&lt;br /&gt;
            fast-forwarding.&lt;br /&gt;
  ff      - Fast-forward when this DTMF digit is received.&lt;br /&gt;
  rew     - Rewind when this DTMF digit is received.&lt;br /&gt;
  stop    - Stop playback when this DTMF digit is received.&lt;br /&gt;
  pause   - Pause playback when this DTMF digit is received.&lt;br /&gt;
  restart - Restart playback when this DTMF digit is received.&lt;br /&gt;
Options:&lt;br /&gt;
  j - Jump to priority n+101 if the requested file is not found.&lt;br /&gt;
  This application sets the following channel variable upon completion:&lt;br /&gt;
  CPLAYBACKSTATUS -  This variable contains the status of the attempt as a text&lt;br /&gt;
                     string, one of: SUCCESS | USERSTOPPED | ERROR&lt;br /&gt;
&lt;br /&gt;
==Cut==&lt;br /&gt;
&lt;br /&gt;
'''Synopsis'''&lt;br /&gt;
&lt;br /&gt;
Splits a variable's contents using the specified delimiter&lt;br /&gt;
&lt;br /&gt;
'''Description'''&lt;br /&gt;
&lt;br /&gt;
Cut(newvar=varname,delimiter,fieldspec):&lt;br /&gt;
&lt;br /&gt;
This application will split the contents of a variable based on the given delimeter and store the result in a new variable.&lt;br /&gt;
 Parameters:&lt;br /&gt;
  newvar    - new variable created from result string&lt;br /&gt;
  varname   - variable you want cut&lt;br /&gt;
  delimiter - defaults to '-'&lt;br /&gt;
  fieldspec - number of the field you want (1-based offset)&lt;br /&gt;
              may also be specified as a range (with -)&lt;br /&gt;
              or group of ranges and fields (with &amp;amp;)&lt;br /&gt;
This application has been deprecated in favor of the CUT function.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Applications</id>
		<title>Applications</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Applications"/>
				<updated>2007-09-12T04:23:27Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Asterisk Applications==&lt;br /&gt;
: Alphabetical Index of Asterisk Applications&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|A - C applications]]&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|G - L applications]]&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|P - R applications]]&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|U - Z applications]]&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|D - F applications]]&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|M - N applications]]&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|S - T applications]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|+ A - C Application Index&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AbsoluteTimeout]]&lt;br /&gt;
| Set absolute maximum time of call&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AddQueueMember]]&lt;br /&gt;
| Dynamically adds queue members&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|ADSIProg]]&lt;br /&gt;
| Load Asterisk ADSI Scripts into phone&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AgentCallbackLogin]]&lt;br /&gt;
| Call agent callback login&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AgentLogin]]&lt;br /&gt;
| Call agent login&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AgentMonitorOutgoing]]&lt;br /&gt;
| Record agent's outgoing call&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AGI]]&lt;br /&gt;
| Executes an AGI compliant application&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AlarmReceiver]]&lt;br /&gt;
| Provide support for receving alarm reports from a burglar or fire alarm panel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|Answer]]&lt;br /&gt;
| Answer a channel if ringing&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|AppendCDRUserField]]&lt;br /&gt;
| Append to the CDR user field&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|Authenticate]]&lt;br /&gt;
| Authenticate a user&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|BackGround]]&lt;br /&gt;
| Play a file while awaiting extension&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|BackgroundDetect]]&lt;br /&gt;
| Background a file with talk detect&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|Busy]]&lt;br /&gt;
| Indicate the Busy condition&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|ChangeMonitor]]&lt;br /&gt;
| Change monitoring filename of a channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|ChanIsAvail]]&lt;br /&gt;
| Check channel availability&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|ChanSpy]]&lt;br /&gt;
| Listen to the audio of an active channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|CheckGroup]]&lt;br /&gt;
| Check the channel count of a group against a limit&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|Congestion]]&lt;br /&gt;
| Indicate the Congestion condition&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|ControlPlayback]]&lt;br /&gt;
| Play a file with fast forward and rewind&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[A-C|Cut]]&lt;br /&gt;
| Splits a variable's contents using the specified delimiter&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|+ D - F Application Index&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DateTime]]&lt;br /&gt;
|Says a specified time in a custom format&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DBdel]]&lt;br /&gt;
|Delete a key from the database&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DBdeltree]]&lt;br /&gt;
|Delete a family or keytree from the database&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DBget]]&lt;br /&gt;
|Retrieve a value from the database&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DBput]]&lt;br /&gt;
|Store a value in the database&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DeadAGI]]&lt;br /&gt;
|Executes AGI on a hungup channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Dial]]&lt;br /&gt;
|Place a call and connect to the current channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Dictate]]&lt;br /&gt;
|Virtual Dictation Machine&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DigitTimeout]]&lt;br /&gt;
|Set maximum timeout between digits&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Directory]]&lt;br /&gt;
|Provide directory of voicemail extensions&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DISA]]&lt;br /&gt;
|DISA (Direct Inward System Access)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DumpChan]]&lt;br /&gt;
|Dump Info About The Calling Channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|DUNDiLookup]]&lt;br /&gt;
|Look up a number with DUNDi&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|EAGI]]&lt;br /&gt;
|Executes an EAGI compliant application&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Echo]]&lt;br /&gt;
|Echo audio read back to the user&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|EndWhile]]&lt;br /&gt;
|End A While Loop&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|EnumLookup]]&lt;br /&gt;
|Lookup number in ENUM&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Eval]]&lt;br /&gt;
|Evaluates a string&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Exec]]&lt;br /&gt;
|Executes internal application&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|ExecIf]]&lt;br /&gt;
|Conditional exec&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|ExecIfTime]]&lt;br /&gt;
|Conditional application execution based on the current time&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|ExternalIVR]]&lt;br /&gt;
|Interfaces with an external IVR application&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Festival]]&lt;br /&gt;
|Say text to the user&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|Flash]]&lt;br /&gt;
|Flashes a Zap Trunk&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[D-F|ForkCDR]]&lt;br /&gt;
|Forks the Call Data Record&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|+ G - L Application Index&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|GetCPEID]]&lt;br /&gt;
|Get ADSI CPE ID&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|GetGroupCount]]&lt;br /&gt;
|Get the channel count of a group&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|GetGroupMatchCount]]&lt;br /&gt;
|Get the channel count of all groups that match a pattern&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|Gosub]]&lt;br /&gt;
|Jump to label, saving return address&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|GosubIf]]&lt;br /&gt;
|Jump to label, saving return address&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|GotoIfTime]]&lt;br /&gt;
|Conditional Goto based on the current time&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|Goto]]&lt;br /&gt;
|Jump to a particular priority, extension, or context&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|GotoIf]]&lt;br /&gt;
|Conditional goto&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|Hangup]]&lt;br /&gt;
|Hang up the calling channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|HasNewVoicemail]]&lt;br /&gt;
|Conditionally branches to priority + 101 with the right options set&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|IAX2Provision]]&lt;br /&gt;
|Provision a calling IAX2 with a given template&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|ICES]]&lt;br /&gt;
|Encode and stream using 'ices'&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|ImportVar]]&lt;br /&gt;
|Import a variable from a channel into a new variable&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|LookupBlacklist]]&lt;br /&gt;
|Look up Caller*ID name/number from blacklist database&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[G-L|LookupCIDName]]&lt;br /&gt;
|Look up CallerID Name from local database&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|+ M - N Application Index&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|Macro]]&lt;br /&gt;
|Macro Implementation&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MacroExit]]&lt;br /&gt;
|Exit From Macro&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MacroIf]]&lt;br /&gt;
|Conditional Macro Implementation&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MailboxExists]]&lt;br /&gt;
|Check to see if Voicemail mailbox exists&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|Math]]&lt;br /&gt;
|Performs Mathematical Functions&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MD5]]&lt;br /&gt;
|Calculate MD5 checksum&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MD5Check]]&lt;br /&gt;
|Check MD5 checksum&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MeetMe]]&lt;br /&gt;
|MeetMe conference bridge&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MeetMeAdmin]]&lt;br /&gt;
|MeetMe conference Administration&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MeetMeCount]]&lt;br /&gt;
|MeetMe participant count&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|Milliwatt]]&lt;br /&gt;
|Generate a Constant 1000Hz tone at 0dbm (mu-law)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|misdn_check_l2l1]]&lt;br /&gt;
|misdn_check_l2l1&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|misdn_facility]]&lt;br /&gt;
|misdn_facility&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|misdn_set_opt]]&lt;br /&gt;
|misdn_set_opt&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MixMonitor]]&lt;br /&gt;
|Record a call and mix the audio during the recording&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|Monitor]]&lt;br /&gt;
|Monitor a channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MP3Player]]&lt;br /&gt;
|Play an MP3 file or stream&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|MusicOnHold]]&lt;br /&gt;
|Play Music On Hold indefinitely&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|NBScat]]&lt;br /&gt;
|Play an NBS local stream&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|NoCDR]]&lt;br /&gt;
|Tell Asterisk to not maintain a CDR for the current call&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[M-N|NoOp]]&lt;br /&gt;
|Do Nothing&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|+ P - R Application Index&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Page]]&lt;br /&gt;
|Pages phones&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Park]]&lt;br /&gt;
|Park yourself&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|ParkAndAnnounce]]&lt;br /&gt;
|Park and Announce&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|ParkedCall]]&lt;br /&gt;
|Answer a parked call&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|PauseQueueMember]]&lt;br /&gt;
|Pauses a queue member&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Pickup]]&lt;br /&gt;
|Directed Call Pickup&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Playback]]&lt;br /&gt;
|Play a file&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|PlayTones]]&lt;br /&gt;
|Play a tone list&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|PrivacyManager]]&lt;br /&gt;
|Require phone number to be entered, if no CallerID sent&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Progress]]&lt;br /&gt;
|Indicate progress&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Queue]]&lt;br /&gt;
|Queue a call for a call queue&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Random]]&lt;br /&gt;
|Conditionally branches, based upon a probability&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Read]]&lt;br /&gt;
|Read a variable&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|ReadFile]]&lt;br /&gt;
|ReadFile(varname=file,length)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|RealTime]]&lt;br /&gt;
|Realtime Data Lookup&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|RealTimeUpdate]]&lt;br /&gt;
|Realtime Data Rewrite&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Record]]&lt;br /&gt;
|Record to a file&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|RemoveQueueMember]]&lt;br /&gt;
|Dynamically removes queue members&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|ResetCDR]]&lt;br /&gt;
|Resets the Call Data Record&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|ResponseTimeout]]&lt;br /&gt;
|Set maximum timeout awaiting response&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|RetryDial]]&lt;br /&gt;
|Place a call, retrying on failure allowing optional exit extension.&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Return]]&lt;br /&gt;
|Return from gosub routine&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[P-R|Ringing]]&lt;br /&gt;
|Indicate ringing tone&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|+ S - T Application Index&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SayAlpha]]&lt;br /&gt;
|Say Alpha&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SayCountPL]]&lt;br /&gt;
|Say the counting word the fits to a number&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SayDigits]]&lt;br /&gt;
|Say Digits&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SayNumber]]&lt;br /&gt;
|Say Number&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SayPhonetic]]&lt;br /&gt;
|Say Phonetic&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SayUnixTime]]&lt;br /&gt;
|Says a specified time in a custom format&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SendDTMF]]&lt;br /&gt;
|Sends arbitrary DTMF digits&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SendImage]]&lt;br /&gt;
|Send an image file&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SendText]]&lt;br /&gt;
|Send a Text Message&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SendURL]]&lt;br /&gt;
|Send a URL&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|Set]]&lt;br /&gt;
|Set channel variable(s) or function value(s)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetAccount]]&lt;br /&gt;
|Set the CDR Account Code&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetAMAFlags]]&lt;br /&gt;
|Set the AMA Flags&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetCallerID]]&lt;br /&gt;
|Set Caller*ID on a call to a new value&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetCallerPres]]&lt;br /&gt;
|Set CallerID Presentation&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetCDRUserField]]&lt;br /&gt;
|Set the CDR user field&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetCIDName]]&lt;br /&gt;
|Set CallerID Name&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetCIDNum]]&lt;br /&gt;
|Set CallerID Number&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetGlobalVar]]&lt;br /&gt;
|Set a global variable to a given value&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetGroup]]&lt;br /&gt;
|Set the channel's group&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetLanguage]]&lt;br /&gt;
|Set the channel's preferred language&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetMusicOnHold]]&lt;br /&gt;
|Set default Music On Hold class&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetRDNIS]]&lt;br /&gt;
|Set RDNIS Number&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetTransferCapability]]&lt;br /&gt;
|Set ISDN Transfer Capability&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SetVar]]&lt;br /&gt;
|Set channel variable(s)&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SIPAddHeader]]&lt;br /&gt;
|Add a SIP header to the outbound call&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SIPDtmfMode]]&lt;br /&gt;
|Change the dtmfmode for a SIP call&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SIPGetHeader]]&lt;br /&gt;
|Get a SIP header from an incoming call&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SMS]]&lt;br /&gt;
|Communicates with SMS service centres and SMS capable analogue phones&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|SoftHangup]]&lt;br /&gt;
|Soft Hangup Application&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|Sort]]&lt;br /&gt;
|Sorts a list of keywords and values&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|StackPop]]&lt;br /&gt;
|Remove one address from gosub stack&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|StartMusicOnHold]]&lt;br /&gt;
|Play Music On Hold&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|StopMonitor]]&lt;br /&gt;
|Stop monitoring a channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|StopMusicOnHold]]&lt;br /&gt;
|Stop Playing Music On Hold&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|StopPlayTones]]&lt;br /&gt;
|Stop playing a tone list&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|System]]&lt;br /&gt;
|Execute a system command&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|TestClient]]&lt;br /&gt;
|Execute Interface Test Client &lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|TestServer]]&lt;br /&gt;
|Execute Interface Test Server&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|Transfer]]&lt;br /&gt;
|Transfer caller to remote extension&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|TrySystem]]&lt;br /&gt;
|Try executing a system command&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[S-T|TXTCIDName]]&lt;br /&gt;
|Lookup caller name from TXT record&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;width:100%; border:solid 1px #AAAAAA; background:#f9f9f9; margin:0; padding:.1em; color:#000; white-space:nowrap; color:#000;&amp;quot;&lt;br /&gt;
|+ U - Z Application Index&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|UnpauseQueueMember]]&lt;br /&gt;
|Unpauses a queue member&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|UserEvent]]&lt;br /&gt;
|Send an arbitrary event to the manager interface&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|Verbose]]&lt;br /&gt;
|Send arbitrary text to verbose output&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|VMAuthenticate]]&lt;br /&gt;
|Authenticate with Voicemail passwords&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|VoiceMail]]&lt;br /&gt;
|Leave a Voicemail message&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|VoiceMailMain]]&lt;br /&gt;
|Check Voicemail messages&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|Wait]]&lt;br /&gt;
|Waits for some time&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|WaitExten]]&lt;br /&gt;
|Waits for an extension to be entered&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|WaitForRing]]&lt;br /&gt;
|Wait for Ring Application&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|WaitForSilence]]&lt;br /&gt;
|Waits for a specified amount of silence&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|WaitMusicOnHold]]&lt;br /&gt;
|Wait, playing Music On Hold&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|While]]&lt;br /&gt;
|Start A While Loop&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|Zapateller]]&lt;br /&gt;
|Block telemarketers with SIT&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|ZapBarge]]&lt;br /&gt;
|Barge in (monitor) Zap channel&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|ZapRAS]]&lt;br /&gt;
|Executes Zaptel ISDN RAS application&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;width:20%;&amp;quot;|&lt;br /&gt;
*[[U-Z|ZapScan]]&lt;br /&gt;
|Scan Zap channels to monitor calls&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Troubleshooting_Guide</id>
		<title>Troubleshooting Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Troubleshooting_Guide"/>
				<updated>2007-09-10T07:02:09Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* feature digit timeout */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Asterisk Troubleshooting Guide&lt;br /&gt;
== Asterisk dialplan rule order ==&lt;br /&gt;
Important to Know! &amp;amp;nbsp; Working with dialplan it may be useful to know the order of the commands, here a small example.&lt;br /&gt;
 [My-Context]&lt;br /&gt;
 1. include =&amp;gt; context1&lt;br /&gt;
 2. include =&amp;gt; context2&lt;br /&gt;
 3. exten =&amp;gt; 100,1,...&lt;br /&gt;
 4. exten =&amp;gt; _1XX,1,...&lt;br /&gt;
 5. exten =&amp;gt; _XXX,1,...&lt;br /&gt;
 6. exten =&amp;gt; _X.,1,...&lt;br /&gt;
The number in the first column shows the rule order. The following CLI command check how the order for the exten 100 are work &lt;br /&gt;
 asterisk -rx &amp;quot;show dialplan 100@My-Context&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Read all Asterisk variables ==&lt;br /&gt;
Here is an example to read all variables used by macro-callforwarding&lt;br /&gt;
&lt;br /&gt;
 [macro-callforwarding]&lt;br /&gt;
 exten =&amp;gt; s,1,Set(temp=${DB(CFI/${ARG1})})&lt;br /&gt;
 exten =&amp;gt; s,n,GotoIf(${temp}?cf:cf_busy)&lt;br /&gt;
 exten =&amp;gt; s,n(cf),NoOp(CFI CALLFORWARDING CFI/${ARG1} -&amp;gt; ${temp} )&lt;br /&gt;
 #include extensions_var.conf&lt;br /&gt;
 exten =&amp;gt; s,n,SetCallerID(62915${ARG1})&lt;br /&gt;
 exten =&amp;gt; s,n,Dial(mISDN/g:pstn/${temp})&lt;br /&gt;
&lt;br /&gt;
The file called extensions_var.conf read all used variables&lt;br /&gt;
&lt;br /&gt;
 ;; list all asterisk variables&lt;br /&gt;
 ;; file = extensions_var.conf&lt;br /&gt;
 ;; include file = extensions_var.conf&lt;br /&gt;
 ;; &lt;br /&gt;
 ;; user to print out:  grep V-V full | awk -F&amp;quot;R=&amp;quot; '{print $2}'&lt;br /&gt;
 ;;&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V= [${ACCOUNTCODE}]  -       ACCOUNTCODE     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${BLINDTRANSFER}]  -     BLINDTRANSFER   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${BRIDGEPEER}]  -        BRIDGEPEER      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLERANI}]  -         CALLERANI       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLERID}]  -  CALLERID)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLERIDNAME}]  -      CALLERIDNAME    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLERIDNUM}]  -       CALLERIDNUM     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLINGANI2}]  -       CALLINGANI2     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLINGPRES}]  -       CALLINGPRES     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLINGTNS}]  -        CALLINGTNS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLINGTON}]  -        CALLINGTON      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CHANNEL}]  -   CHANNEL )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CONTEXT}]  -   CONTEXT )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DATETIME}]  -  DATETIME)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DNID}]  -      DNID    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${EPOCH}]  -     EPOCH   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${EXTEN}]  -     EXTEN   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${ENV(VAR)}]  -  ENV VAR )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${GOTO_ON_BLINDXFR}]  -  GOTO_ON_BLINDXFR)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${HANGUPCAUSE}]  -       HANGUPCAUSE     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${HINT}]  -      HINT    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${HINTNAME}]  -  HINTNAME)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${INVALID_EXTEN}]  -     INVALID_EXTEN   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LANGUAGE}]  -  LANGUAGE)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LEN(VAR)}]  -  LEN VAR&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${PRIORITY}]  -  PRIORITY)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${PRIREDIRECTREASON}]  -         PRIREDIRECTREASON      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${RDNIS}]  -     RDNIS   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TIMESTAMP}]  -         TIMESTAMP       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TRANSFER_CONTEXT}]  -  TRANSFER_CONTEXT       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${UNIQUEID}]  -  UNIQUEID)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AQMSTATUS}]  -         AQMSTATUS       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AVAILSTATUS}]  -       AVAILSTATUS     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CHECKGROUPSTATUS}]  -  CHECKGROUPSTATUS       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CHECKMD5STATUS}]  -    CHECKMD5STATUS  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CPLAYBACKSTATUS}]  -   CPLAYBACKSTATUS )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DIALSTATUS}]  -        DIALSTATUS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DBGETSTATUS}]  -       DBGETSTATUS     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${ENUMSTATUS}]  -        ENUMSTATUS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${HASVMSTATUS}]  -       HASVMSTATUS     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LOOKUPBLSTATUS}]  -    LOOKUPBLSTATUS  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPLOOKUPSTATUS}]  -   OSPLOOKUPSTATUS )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPNEXTSTATUS}]  -     OSPNEXTSTATUS   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPFINISHSTATUS}]  -   OSPFINISHSTATUS )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${PLAYBACKSTATUS}]  -    PLAYBACKSTATUS  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${PQMSTATUS}]  -         PQMSTATUS       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${PRIVACYMGRSTATUS}]  -  PRIVACYMGRSTATUS       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${QUEUESTATUS}]  -       QUEUESTATUS     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${RQMSTATUS}]  -         RQMSTATUS       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SENDIMAGESTATUS}]  -   SENDIMAGESTATUS )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SENDTEXTSTATUS}]  -    SENDTEXTSTATUS  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SENDURLSTATUS}]  -     SENDURLSTATUS   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SIPGETSTATUS}]  -      SIPGETSTATUS    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SYSTEMSTATUS}]  -      SYSTEMSTATUS    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TRANSFERSTATUS}]  -    TRANSFERSTATUS  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TXTCIDNAMESTATUS}]  -  TXTCIDNAMESTATUS       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${UPQMSTATUS}]  -        UPQMSTATUS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VMSTATUS}]  -  VMSTATUS)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VMBOXEXISTSSTATUS}]  -         VMBOXEXISTSSTATUS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${WAITSTATUS}]  -        WAITSTATUS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CURL}]  -      CURL    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${ENUM}]  -      ENUM    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${EXITCONTEXT}]  -       EXITCONTEXT     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MONITOR}]  -   MONITOR )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MONITOR_EXEC}]  -      MONITOR_EXEC    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MONITOR_EXEC_ARGS}]  -         MONITOR_EXEC_ARGS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MONITOR_FILENAME}]  -  MONITOR_FILENAME       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${QUEUE_PRIO}]  -        QUEUE_PRIO      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${QUEUESTATUS}]  -       QUEUESTATUS     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${RECORDED_FILE}]  -     RECORDED_FILE   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TALK_DETECTED}]  -     TALK_DETECTED   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TOUCH_MONITOR}]  -     TOUCH_MONITOR   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TOUCH_MONITOR_FORMAT}]  -      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${TXTCIDNAME}]  -        TXTCIDNAME      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VPB_GETDTMF}]  -       VPB_GETDTMF     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MEETME_RECORDINGFILE}]  -      MEETME_RECORDINGFILE   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MEETME_RECORDINGFORMAT}]  -    MEETME_RECORDINGFORMAT )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MEETME_EXIT_CONTEXT}]  -       MEETME_EXIT_CONTEXT    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MEETME_AGI_BACKGROUND}]  -     MEETME_AGI_BACKGROUND  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MEETMESECS}]  -        MEETMESECS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_CATEGORY}]  -       VM_CATEGORY     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_NAME}]  -   VM_NAME )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_DUR}]  -    VM_DUR  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_MSGNUM}]  -         VM_MSGNUM       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_CALLERID}]  -       VM_CALLERID     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_CIDNAME}]  -        VM_CIDNAME      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_CIDNUM}]  -         VM_CIDNUM       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_DATE}]  -   VM_DATE )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${VM_MESSAGEFILE}]  -    VM_MESSAGEFILE  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AUTH_MAILBOX}]  -      AUTH_MAILBOX    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AUTH_CONTEXT}]  -      AUTH_CONTEXT    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DUNDTECH}]  -  DUNDTECH)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DUNDDEST}]  -  DUNDDEST)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${ANI2}]  -      ANI2    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLTYPE}]  -  CALLTYPE)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLEDTON}]  -         CALLEDTON       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${CALLINGSUBADDR}]  -    CALLINGSUBADDR  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${FAXEXTEN}]  -  FAXEXTEN)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${PRIREDIRECTREASON}]  -         PRIREDIRECTREASON      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SIPCALLID}]  -         SIPCALLID       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SIPDOMAIN}]  -         SIPDOMAIN       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SIPUSERAGENT}]  -      SIPUSERAGENT    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SIPURI}]  -    SIPURI  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SIP_CODEC}]  -         SIP_CODEC       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${SIP_URI_OPTIONS}]  -   SIP_URI_OPTIONS )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTMAXLOGINTRIES}]  -        AGENTMAXLOGINTRIES     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTUPDATECDR}]  -    AGENTUPDATECDR  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTGOODBYE}]  -      AGENTGOODBYE    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTACKCALL}]  -      AGENTACKCALL    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTAUTOLOGOFF}]  -   AGENTAUTOLOGOFF )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTWRAPUPTIME}]  -   AGENTWRAPUPTIME )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTNUMBER}]  -       AGENTNUMBER     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTSTATUS}]  -       AGENTSTATUS     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AGENTEXTEN}]  -        AGENTEXTEN      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DIALEDPEERNAME}]  -    DIALEDPEERNAME  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DIALEDPEERNUMBER}]  -  DIALEDPEERNUMBER       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DIALEDTIME}]  -        DIALEDTIME      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${ANSWEREDTIME}]  -      ANSWEREDTIME    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DIALSTATUS}]  -        DIALSTATUS      )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${DYNAMIC_FEATURES}]  -  DYNAMIC_FEATURES       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LIMIT_PLAYAUDIO_CALLER}]  -    LIMIT_PLAYAUDIO_CALLER )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LIMIT_PLAYAUDIO_CALLEE}]  -    LIMIT_PLAYAUDIO_CALLEE )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LIMIT_WARNING_FILE}]  -        LIMIT_WARNING_FILE     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LIMIT_TIMEOUT_FILE}]  -        LIMIT_TIMEOUT_FILE     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${LIMIT_CONNECT_FILE}]  -        LIMIT_CONNECT_FILE     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OUTBOUND_GROUP}]  -    OUTBOUND_GROUP  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AVAILCHAN}]  -         AVAILCHAN       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AVAILORIGCHAN}]  -     AVAILORIGCHAN   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${AVAILSTATUS}]  -       AVAILSTATUS     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MACRO_EXTEN}]  -       MACRO_EXTEN     )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MACRO_CONTEXT}]  -     MACRO_CONTEXT   )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MACRO_PRIORITY}]  -    MACRO_PRIORITY  )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${MACRO_OFFSET}]  -      MACRO_OFFSET    )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPHANDLE}]  -         OSPHANDLE       )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPTECH}]  -   OSPTECH )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPDEST}]  -   OSPDEST )&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPTOKEN}]  -  OSPTOKEN)&lt;br /&gt;
 exten =&amp;gt; s,n,NoOp(V-VAR= [${OSPRESULTS}]  -        OSPRESULTS      )&lt;br /&gt;
&lt;br /&gt;
==feature digit timeout==&lt;br /&gt;
This feature can solve troubles with phone devices by call transfer, using ''featuredigittimeout'' insert into features.conf&lt;br /&gt;
 [general]&lt;br /&gt;
 &lt;br /&gt;
 featuredigittimeout =&amp;gt; 1000 ; Max time (ms) between digits for&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Configuration_Guide</id>
		<title>Configuration Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Configuration_Guide"/>
				<updated>2007-09-10T07:01:44Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Asterisk configuring Guide&lt;br /&gt;
still empty, wait to author&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Installation_Guide</id>
		<title>Installation Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Installation_Guide"/>
				<updated>2007-09-10T06:59:43Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Prerequisite Hardware Minimums&lt;br /&gt;
&lt;br /&gt;
Asterisk can be very processor-intensive, due to its use of the CPU to perform Digital Signal Prosessing (DSP). If you are building a complex, high-usage system, this is extremely important to understand. However, for the purposes of building your first Asterisk PBX, you can use any Intel-compatible (x86) machine, they can by a 300MHz Pentium with 256 memory. Essentially, if you can install and run Fedora Core on it, it should be suitable for your first Asterisk install. If you planing to install a PBX using E1/T1 or BRI Gateway, then better take Debian Linux.&lt;br /&gt;
&lt;br /&gt;
; Comiling Asterisk on Linux&lt;br /&gt;
Note. Follow this install order: libpri, zaptel, asterisk&lt;br /&gt;
&lt;br /&gt;
After download and extract the tarball into /usr/src/asterisk&lt;br /&gt;
&lt;br /&gt;
 ~#cd /usr/src/asterisk&lt;br /&gt;
&lt;br /&gt;
; Installing libpri&lt;br /&gt;
&lt;br /&gt;
 ~#cd /usr/src/asterisk/libpri&lt;br /&gt;
 ~#make clean&lt;br /&gt;
 ~#make&lt;br /&gt;
 ~#make install&lt;br /&gt;
&lt;br /&gt;
; Installing zaptel&lt;br /&gt;
&lt;br /&gt;
 ~#cd /usr/src/asterisk/zaptel&lt;br /&gt;
 ~#make clean&lt;br /&gt;
&lt;br /&gt;
Note. If you are using kernel 2.6 enter the following command '#make linux26', before doing '#make install'.&lt;br /&gt;
&lt;br /&gt;
 ~#make install&lt;br /&gt;
&lt;br /&gt;
; Installing Asterisk&lt;br /&gt;
&lt;br /&gt;
 ~#cd /usr/src/asterisk/asterisk&lt;br /&gt;
 ~#make clean&lt;br /&gt;
 ~#make&lt;br /&gt;
&lt;br /&gt;
Note: If you want to use a mp3 files for music-on-hold enter the following command '#make mpg123', before ran '#make install'.&lt;br /&gt;
&lt;br /&gt;
 ~#make install&lt;br /&gt;
&lt;br /&gt;
Note. If this the first installation perform 'make samples' to install sample configuration files.&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Current_events</id>
		<title>Current events</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Current_events"/>
				<updated>2007-09-04T14:32:55Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;no events yet :-(&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Asterisk_HowTo%27s</id>
		<title>Asterisk HowTo's</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Asterisk_HowTo%27s"/>
				<updated>2007-09-04T13:57:03Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* Asterisk Ringtone identification */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div align=&amp;quot;right&amp;quot;&amp;gt; --[[User:Don.K|Don.K]] 06:38, 5 September 2007 (CEST)&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Asterisk Voicemail spool ==&lt;br /&gt;
If you do not want to store your voicemails on your Asterisk PBX server, you can edit voicemail.conf to delete them. However, using a program called Sendmail, you can make Asterisk email your PBX user the new voicemail, and then the voicemail gets deleted off the server. The following option needs to be ''yes'' in voicemail.conf&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;&lt;br /&gt;
 /etc/asterisk/voicemail.conf&lt;br /&gt;
&lt;br /&gt;
 delete=yes  ; After notification, the voicemail is deleted from the server. [per-mailbox only]&lt;br /&gt;
             ; This is intended for use with users who wish to receive their voicemail ONLY by email.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This script to relieve this /bin/delvm, delete every 5 min. voicemail in the vm-spool queue&lt;br /&gt;
(I'm not sure what this script does, other than maybe check voicemailboxes every 5 minutes, and delete periodically. Please edit in English)&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 #&lt;br /&gt;
 # build-in use crontab -e */5 * * * * /bin/delvm&lt;br /&gt;
 # Autor: Don.K at 6th Nov 2006 &amp;lt;br&amp;gt;&lt;br /&gt;
 # define here your context, mainly is default&lt;br /&gt;
 cx=default&amp;lt;br&amp;gt;&lt;br /&gt;
 vmbox=`asterisk -rx &amp;quot;show voicemail users&amp;quot; | grep $cx | awk '{print $2}'` &amp;lt;br&amp;gt;&lt;br /&gt;
 if [ -e /var/spool/asterisk/voicemail/$cx/$vmbox/INBOX/msg0000.wav ]; then&lt;br /&gt;
      rm /var/spool/asterisk/voicemail/$cx/$vmbox/INBOX/*&lt;br /&gt;
   else&lt;br /&gt;
   exit 0&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
==Call Pickup==&lt;br /&gt;
In order to be able to take over a call on another telephone, must be registered than first in the configuration features.conf as a pickup extension.&lt;br /&gt;
 pickupexten = *8&lt;br /&gt;
Now we can implement extension the call pickup are with the option '''callgroup''' and '''pickupgroup''' and the value for the group the calls to take over are in sip.conf for the appropriate telephone registering.&lt;br /&gt;
 [GXP2000]&lt;br /&gt;
 type = friend&lt;br /&gt;
 username = 201&lt;br /&gt;
 secret = 1234&lt;br /&gt;
 context = default&lt;br /&gt;
 dtmfmode = rfc2833&lt;br /&gt;
 callgroup = 2&lt;br /&gt;
 pickupgroup = 2&lt;br /&gt;
 disallow = all&lt;br /&gt;
 allow=ulaw&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 allow=g723.1&lt;br /&gt;
 allow=g729&lt;br /&gt;
&lt;br /&gt;
==Feature Application==&lt;br /&gt;
An Feature Application will most there used where no appropriate button exist on the phone. For instance the Call Transfer on Siemens Gigaset 450C or often other DECT Telephone without Transfer (TRNF) key.&lt;br /&gt;
 features.conf &amp;lt;br&amp;gt;&lt;br /&gt;
 [general] &amp;lt;br&amp;gt;&lt;br /&gt;
 #include parking_additional.inc&lt;br /&gt;
 #include features_general_custom.conf &amp;lt;br&amp;gt;&lt;br /&gt;
 featuredigittimeout =&amp;gt; 1000 ; Max time (ms) between digits for &amp;lt;br&amp;gt;&lt;br /&gt;
 [applicationmap] &amp;lt;br&amp;gt;&lt;br /&gt;
 #include features_applicationmap_additional.conf &amp;lt;br&amp;gt;&lt;br /&gt;
 [featuremap] &amp;lt;br&amp;gt;&lt;br /&gt;
 blindxfer =&amp;gt; ## ; Blind Transfer&lt;br /&gt;
 atxfer =&amp;gt; **    ; Attended Xfer&lt;br /&gt;
 automon =&amp;gt; *1   ; One Touch Record&lt;br /&gt;
&lt;br /&gt;
==Re-dialing on Asterisk==&lt;br /&gt;
If your telephone does not offer a redial feature, the following example can be used to re-dial the last number by dialing *5. The following example fits into extensions.conf&lt;br /&gt;
&lt;br /&gt;
 [default]&lt;br /&gt;
 include =&amp;gt; macro-recall &amp;lt;br&amp;gt;&lt;br /&gt;
 exten =&amp;gt; _X.,1,Macro(recall,${EXTEN})&lt;br /&gt;
 exten =&amp;gt; *5,1,DBget(toCall=redial/${CALLERID})&lt;br /&gt;
 exten =&amp;gt; *5,2,Macro(recall,${toCall})&lt;br /&gt;
 exten =&amp;gt; *5,102,Hangup()&amp;lt;br&amp;gt;&lt;br /&gt;
 [macro-recall]&lt;br /&gt;
 exten =&amp;gt; s,1,DBput(redial/${CALLERID}=${ARG1})&lt;br /&gt;
 exten =&amp;gt; s,1,Dial(SIP/${ARG1},20)&lt;br /&gt;
 exten =&amp;gt; s,2,Goto(s-${DIALSTATUS},1)&lt;br /&gt;
 exten =&amp;gt; s-NOANSWER,1,Voicemail(u${ARG1})&lt;br /&gt;
 exten =&amp;gt; s-BUSY,1,Voicemail(b${ARG1})&lt;br /&gt;
 exten =&amp;gt; _s-.,1,Goto(s-NOANSWER,1)&lt;br /&gt;
&lt;br /&gt;
==Asterisk GSM Soundformat==&lt;br /&gt;
Sound files made on Windows are usually wave files. These wave files cannot be read and processed by Asterisk, so we will have to change these wave files into an Asterisk-compatible format, such as GSM. Using a software called ''SOX'', we can do so. The following example shows how to convert foo.wav into foo.gsm using SOX.&lt;br /&gt;
&lt;br /&gt;
 sox foo.wav -r 8000 -c1 foo.gsm resample -ql&lt;br /&gt;
The converted gsm sound files after copy /var/lib/asterisk/sounds/custom&lt;br /&gt;
there are asterisk compatible wave formats&lt;br /&gt;
 sox wav_file.wav gsm_file.gsm&lt;br /&gt;
 sox gsm_file.gsm wav_file.wav&lt;br /&gt;
 sox unnow_wav_file.wav asterisk_wav_file.wav&lt;br /&gt;
&lt;br /&gt;
==Call forwarding==&lt;br /&gt;
This implementation allow Call forwarding by using dial *72*nnnnnn#, n is the number where the call to forward&lt;br /&gt;
 exten =&amp;gt; _*72*.,1,Answer()&lt;br /&gt;
 exten =&amp;gt; _*72*.,2,Set(DB(CFI/${CALLERID(NUM)})=${EXTEN:4})&lt;br /&gt;
 exten =&amp;gt; _*72*.,n,Playback(vm-saved)&lt;br /&gt;
 exten =&amp;gt; _*72*.,n,SayDigits(${EXTEN:4})&lt;br /&gt;
 exten =&amp;gt; _*72*.,n,Hangup()&lt;br /&gt;
Disallow Call forwarding by using dial #73#&lt;br /&gt;
 exten =&amp;gt; #73#,1,Answer()&lt;br /&gt;
 exten =&amp;gt; #73#,n,DBdel(CFI/${CALLERID(num)})&lt;br /&gt;
 exten =&amp;gt; #73#,n,Playback(call-fwd-cancelled)&lt;br /&gt;
 exten =&amp;gt; #73#,n,Hangup()&lt;br /&gt;
This will need the macro insert into the appropriate extension, like extension 200 &lt;br /&gt;
 [200]&lt;br /&gt;
 exten =&amp;gt; 200,1,Macro,callforwarding|${EXTEN}&lt;br /&gt;
 exten =&amp;gt; 200,n,Dial(SIP/202,30,mt)&lt;br /&gt;
 exten =&amp;gt; 200,n,Hangup()&lt;br /&gt;
insert ''macro-callforwarding'' into extensions.conf above the default context and below general section&lt;br /&gt;
 [macro-callforwarding]&lt;br /&gt;
 exten =&amp;gt; s,1,Set(temp=${DB(CFI/${ARG1})})&lt;br /&gt;
 exten =&amp;gt; s,n,GotoIf(${temp}?cfi:nocfi)&lt;br /&gt;
 exten =&amp;gt; s,n(cfi),Dial(SIP/${temp})&lt;br /&gt;
 exten =&amp;gt; s,n(nocfi),NoOp&lt;br /&gt;
Note, if your phone may don't understood the pound key (#) like Grandstream, then apply another char for instance (*) or only numbers&lt;br /&gt;
&lt;br /&gt;
==Asterisk Ringtone identification==&lt;br /&gt;
&lt;br /&gt;
An Asterisk macro using ringtone identification. In companies, it makes sense to detect the distinction between an internal and an external call.&lt;br /&gt;
&lt;br /&gt;
That provide the following Macro, which in is entered in the configuration file extensions.conf, on FreePBX this is the file extensions_custom.conf.&lt;br /&gt;
	&lt;br /&gt;
In this example with '''SIPAddHeader''', this is here for &amp;quot;global&amp;quot; settings, for all external calls now sounds a different tone, the first command generates an additional 0 (Zero) to add automatically a valid prefix for outgoing dial number while call externally.&lt;br /&gt;
&lt;br /&gt;
 [macro-exten_did_prefix] &amp;lt;br&amp;gt;&lt;br /&gt;
 exten =&amp;gt; s,1,Set(CALLERID(num)=0${CALLERID(num)})&lt;br /&gt;
 exten =&amp;gt; s,1,Set(CALLERID(num)=${CALLERID(num)})&lt;br /&gt;
 exten =&amp;gt; s,n,SIPAddHeader(&amp;quot;Alert-Info: &amp;lt;http://127.0.0.1&amp;gt;\;info=alert-external\;x-line-id=0;&amp;quot;)&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Zapata</id>
		<title>Zapata</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Zapata"/>
				<updated>2007-09-04T13:39:05Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Zapata telephony interface&lt;br /&gt;
;&lt;br /&gt;
; Configuration file&lt;br /&gt;
;&lt;br /&gt;
; You need to restart Asterisk to re-configure the Zap channel&lt;br /&gt;
; CLI&amp;gt; reload chan_zap.so &lt;br /&gt;
;		will reload the configuration file,&lt;br /&gt;
;		but not all configuration options are &lt;br /&gt;
; 		re-configured during a reload.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[trunkgroups]&lt;br /&gt;
;&lt;br /&gt;
; Trunk groups are used for NFAS or GR-303 connections.&lt;br /&gt;
;&lt;br /&gt;
; Group: Defines a trunk group.  &lt;br /&gt;
;        trunkgroup =&amp;gt; &amp;lt;trunkgroup&amp;gt;,&amp;lt;dchannel&amp;gt;[,&amp;lt;backup1&amp;gt;...]&lt;br /&gt;
;&lt;br /&gt;
;        trunkgroup  is the numerical trunk group to create&lt;br /&gt;
;        dchannel    is the zap channel which will have the &lt;br /&gt;
;                    d-channel for the trunk.&lt;br /&gt;
;        backup1     is an optional list of backup d-channels.&lt;br /&gt;
;&lt;br /&gt;
;trunkgroup =&amp;gt; 1,24,48&lt;br /&gt;
;trunkgroup =&amp;gt; 1,24&lt;br /&gt;
;&lt;br /&gt;
; Spanmap: Associates a span with a trunk group&lt;br /&gt;
;        spanmap =&amp;gt; &amp;lt;zapspan&amp;gt;,&amp;lt;trunkgroup&amp;gt;[,&amp;lt;logicalspan&amp;gt;]&lt;br /&gt;
;&lt;br /&gt;
;        zapspan     is the zap span number to associate&lt;br /&gt;
;        trunkgroup  is the trunkgroup (specified above) for the mapping&lt;br /&gt;
;        logicalspan is the logical span number within the trunk group to use.&lt;br /&gt;
;                    if unspecified, no logical span number is used.&lt;br /&gt;
;&lt;br /&gt;
;spanmap =&amp;gt; 1,1,1&lt;br /&gt;
;spanmap =&amp;gt; 2,1,2&lt;br /&gt;
;spanmap =&amp;gt; 3,1,3&lt;br /&gt;
;spanmap =&amp;gt; 4,1,4&lt;br /&gt;
&lt;br /&gt;
[channels]&lt;br /&gt;
;&lt;br /&gt;
; Default language&lt;br /&gt;
;&lt;br /&gt;
;language=en&lt;br /&gt;
;&lt;br /&gt;
; Default context&lt;br /&gt;
;&lt;br /&gt;
context=default&lt;br /&gt;
;&lt;br /&gt;
; Switchtype:  Only used for PRI.&lt;br /&gt;
;&lt;br /&gt;
; national:	  National ISDN 2 (default)&lt;br /&gt;
; dms100:	  Nortel DMS100&lt;br /&gt;
; 4ess:           AT&amp;amp;T 4ESS&lt;br /&gt;
; 5ess:	          Lucent 5ESS&lt;br /&gt;
; euroisdn:       EuroISDN&lt;br /&gt;
; ni1:            Old National ISDN 1&lt;br /&gt;
; qsig:           Q.SIG&lt;br /&gt;
;&lt;br /&gt;
switchtype=national&lt;br /&gt;
;&lt;br /&gt;
; Some switches (AT&amp;amp;T especially) require network specific facility IE&lt;br /&gt;
; supported values are currently 'none', 'sdn', 'megacom', 'accunet'&lt;br /&gt;
;&lt;br /&gt;
;nsf=none&lt;br /&gt;
;&lt;br /&gt;
; PRI Dialplan:  Only RARELY used for PRI.&lt;br /&gt;
;&lt;br /&gt;
; unknown:        Unknown&lt;br /&gt;
; private:        Private ISDN&lt;br /&gt;
; local:          Local ISDN&lt;br /&gt;
; national:	  National ISDN&lt;br /&gt;
; international:  International ISDN&lt;br /&gt;
; dynamic:	  Dynamically selects the appropriate dialplan&lt;br /&gt;
;&lt;br /&gt;
;pridialplan=national&lt;br /&gt;
;&lt;br /&gt;
; PRI Local Dialplan:  Only RARELY used for PRI (sets the calling number's numbering plan)&lt;br /&gt;
;&lt;br /&gt;
; unknown:        Unknown&lt;br /&gt;
; private:        Private ISDN&lt;br /&gt;
; local:          Local ISDN&lt;br /&gt;
; national:	  National ISDN&lt;br /&gt;
; international:  International ISDN&lt;br /&gt;
; dynamic:	  Dynamically selects the appropriate dialplan&lt;br /&gt;
;&lt;br /&gt;
;prilocaldialplan=national&lt;br /&gt;
;&lt;br /&gt;
; PRI callerid prefixes based on the given TON/NPI (dialplan)&lt;br /&gt;
; This is especially needed for euroisdn E1-PRIs&lt;br /&gt;
; &lt;br /&gt;
; sample 1 for Germany &lt;br /&gt;
;internationalprefix = 00&lt;br /&gt;
;nationalprefix = 0&lt;br /&gt;
;localprefix = 0711&lt;br /&gt;
;privateprefix = 07115678&lt;br /&gt;
;unknownprefix = &lt;br /&gt;
;&lt;br /&gt;
; sample 2 for Germany &lt;br /&gt;
;internationalprefix = +&lt;br /&gt;
;nationalprefix = +49&lt;br /&gt;
;localprefix = +49711&lt;br /&gt;
;privateprefix = +497115678&lt;br /&gt;
;unknownprefix = &lt;br /&gt;
;&lt;br /&gt;
; PRI resetinterval: sets the time in seconds between restart of unused&lt;br /&gt;
; channels, defaults to 3600; minimum 60 seconds.  Some PBXs don't like&lt;br /&gt;
; channel restarts. so set the interval to a very long interval e.g. 100000000&lt;br /&gt;
; or 'never' to disable *entirely*.&lt;br /&gt;
;&lt;br /&gt;
;resetinterval = 3600 &lt;br /&gt;
;&lt;br /&gt;
; Overlap dialing mode (sending overlap digits)&lt;br /&gt;
;&lt;br /&gt;
;overlapdial=yes&lt;br /&gt;
;&lt;br /&gt;
; PRI Out of band indications.&lt;br /&gt;
; Enable this to report Busy and Congestion on a PRI using out-of-band&lt;br /&gt;
; notification. Inband indication, as used by Asterisk doesn't seem to work&lt;br /&gt;
; with all telcos.&lt;br /&gt;
; &lt;br /&gt;
; outofband:      Signal Busy/Congestion out of band with RELEASE/DISCONNECT&lt;br /&gt;
; inband:         Signal Busy/Congestion using in-band tones&lt;br /&gt;
;&lt;br /&gt;
; priindication = outofband&lt;br /&gt;
;&lt;br /&gt;
; If you need to override the existing channels selection routine and force all&lt;br /&gt;
; PRI channels to be marked as exclusively selected, set this to yes.&lt;br /&gt;
; priexclusive = yes&lt;br /&gt;
;&lt;br /&gt;
; ISDN Timers&lt;br /&gt;
; All of the ISDN timers and counters that are used are configurable.  Specify&lt;br /&gt;
; the timer name, and its value (in ms for timers).&lt;br /&gt;
;&lt;br /&gt;
; pritimer =&amp;gt; t200,1000&lt;br /&gt;
; pritimer =&amp;gt; t313,4000&lt;br /&gt;
;&lt;br /&gt;
; To enable transmission of facility-based ISDN supplementary services (such&lt;br /&gt;
; as caller name from CPE over facility), enable this option.&lt;br /&gt;
; facilityenable = yes&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; Signalling method (default is fxs).  Valid values:&lt;br /&gt;
; em:             E &amp;amp; M&lt;br /&gt;
; em_w:           E &amp;amp; M Wink&lt;br /&gt;
; featd:          Feature Group D (The fake, Adtran style, DTMF)&lt;br /&gt;
; featdmf:        Feature Group D (The real thing, MF (domestic, US))&lt;br /&gt;
; featdmf_ta:     Feature Group D (The real thing, MF (domestic, US)) through&lt;br /&gt;
;                 a Tandem Access point&lt;br /&gt;
; featb:          Feature Group B (MF (domestic, US))&lt;br /&gt;
; fxs_ls:         FXS (Loop Start)&lt;br /&gt;
; fxs_gs:         FXS (Ground Start)&lt;br /&gt;
; fxs_ks:         FXS (Kewl Start)&lt;br /&gt;
; fxo_ls:         FXO (Loop Start)&lt;br /&gt;
; fxo_gs:         FXO (Ground Start)&lt;br /&gt;
; fxo_ks:         FXO (Kewl Start)&lt;br /&gt;
; pri_cpe:        PRI signalling, CPE side&lt;br /&gt;
; pri_net:        PRI signalling, Network side&lt;br /&gt;
; gr303fxoks_net: GR-303 Signalling, FXO Loopstart, Network side&lt;br /&gt;
; gr303fxsks_cpe: GR-303 Signalling, FXS Loopstart, CPE side&lt;br /&gt;
; sf:	          SF (Inband Tone) Signalling&lt;br /&gt;
; sf_w:	          SF Wink&lt;br /&gt;
; sf_featd:       SF Feature Group D (The fake, Adtran style, DTMF)&lt;br /&gt;
; sf_featdmf:     SF Feature Group D (The real thing, MF (domestic, US))&lt;br /&gt;
; sf_featb:       SF Feature Group B (MF (domestic, US))&lt;br /&gt;
; e911:           E911 (MF) style signalling&lt;br /&gt;
;&lt;br /&gt;
; The following are used for Radio interfaces:&lt;br /&gt;
; fxs_rx:         Receive audio/COR on an FXS kewlstart interface (FXO at the&lt;br /&gt;
;                 channel bank)&lt;br /&gt;
; fxs_tx:         Transmit audio/PTT on an FXS loopstart interface (FXO at the&lt;br /&gt;
;                 channel bank)&lt;br /&gt;
; fxo_rx:         Receive audio/COR on an FXO loopstart interface (FXS at the&lt;br /&gt;
;                 channel bank)&lt;br /&gt;
; fxo_tx:         Transmit audio/PTT on an FXO groundstart interface (FXS at&lt;br /&gt;
;                 the channel bank)&lt;br /&gt;
; em_rx:          Receive audio/COR on an E&amp;amp;M interface (1-way)&lt;br /&gt;
; em_tx:          Transmit audio/PTT on an E&amp;amp;M interface (1-way)&lt;br /&gt;
; em_txrx:        Receive audio/COR AND Transmit audio/PTT on an E&amp;amp;M interface&lt;br /&gt;
;                 (2-way)&lt;br /&gt;
; em_rxtx:        Same as em_txrx (for our dyslexic friends)&lt;br /&gt;
; sf_rx:          Receive audio/COR on an SF interface (1-way)&lt;br /&gt;
; sf_tx:          Transmit audio/PTT on an SF interface (1-way)&lt;br /&gt;
; sf_txrx:        Receive audio/COR AND Transmit audio/PTT on an SF interface&lt;br /&gt;
;                 (2-way)&lt;br /&gt;
; sf_rxtx:        Same as sf_txrx (for our dyslexic friends)&lt;br /&gt;
;&lt;br /&gt;
signalling=fxo_ls&lt;br /&gt;
;&lt;br /&gt;
; For Feature Group D Tandem access, to set the default CIC and OZZ use these&lt;br /&gt;
; parameters:&lt;br /&gt;
;defaultozz=0000&lt;br /&gt;
;defaultcic=303&lt;br /&gt;
;&lt;br /&gt;
; A variety of timing parameters can be specified as well&lt;br /&gt;
; Including:&lt;br /&gt;
;    prewink:     Pre-wink time (default 50ms)&lt;br /&gt;
;    preflash:    Pre-flash time (default 50ms)&lt;br /&gt;
;    wink:        Wink time (default 150ms)&lt;br /&gt;
;    flash:       Flash time (default 750ms)&lt;br /&gt;
;    start:       Start time (default 1500ms)&lt;br /&gt;
;    rxwink:      Receiver wink time (default 300ms)&lt;br /&gt;
;    rxflash:     Receiver flashtime (default 1250ms)&lt;br /&gt;
;    debounce:    Debounce timing (default 600ms)&lt;br /&gt;
;&lt;br /&gt;
rxwink=300		; Atlas seems to use long (250ms) winks&lt;br /&gt;
;&lt;br /&gt;
; How long generated tones (DTMF and MF) will be played on the channel&lt;br /&gt;
; (in milliseconds)&lt;br /&gt;
;toneduration=100&lt;br /&gt;
;&lt;br /&gt;
; Whether or not to do distinctive ring detection on FXO lines&lt;br /&gt;
;&lt;br /&gt;
;usedistinctiveringdetection=yes&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Whether or not to use caller ID&lt;br /&gt;
;&lt;br /&gt;
usecallerid=yes&lt;br /&gt;
;&lt;br /&gt;
; Type of caller ID signalling in use&lt;br /&gt;
;     bell     = bell202 as used in US&lt;br /&gt;
;     v23      = v23 as used in the UK&lt;br /&gt;
;     dtmf     = DTMF as used in Denmark, Sweden and Netherlands&lt;br /&gt;
;&lt;br /&gt;
;cidsignalling=bell&lt;br /&gt;
;&lt;br /&gt;
; What signals the start of caller ID&lt;br /&gt;
;     ring     = a ring signals the start&lt;br /&gt;
;     polarity = polarity reversal signals the start&lt;br /&gt;
;&lt;br /&gt;
;cidstart=ring&lt;br /&gt;
;&lt;br /&gt;
; Whether or not to hide outgoing caller ID (Override with *67 or *82)&lt;br /&gt;
;&lt;br /&gt;
hidecallerid=no&lt;br /&gt;
;&lt;br /&gt;
; Whether or not to enable call waiting on internal extensions&lt;br /&gt;
; With this set to 'yes', busy extensions will hear the call-waiting&lt;br /&gt;
; tone, and can use hook-flash to switch between callers. The Dial()&lt;br /&gt;
; app will not return the &amp;quot;BUSY&amp;quot; result for extensions.&lt;br /&gt;
;&lt;br /&gt;
callwaiting=yes&lt;br /&gt;
;&lt;br /&gt;
; Whether or not restrict outgoing caller ID (will be sent as ANI only, not&lt;br /&gt;
; available for the user)&lt;br /&gt;
; Mostly use with FXS ports&lt;br /&gt;
;&lt;br /&gt;
;restrictcid=no&lt;br /&gt;
;&lt;br /&gt;
; Whether or not use the caller ID presentation for the outgoing call that the&lt;br /&gt;
; calling switch is sending.&lt;br /&gt;
;&lt;br /&gt;
usecallingpres=yes&lt;br /&gt;
;&lt;br /&gt;
; Some countries (UK) have ring tones with different ring tones (ring-ring),&lt;br /&gt;
; which means the callerid needs to be set later on, and not just after&lt;br /&gt;
; the first ring, as per the default. &lt;br /&gt;
;&lt;br /&gt;
;sendcalleridafter=1&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; Support Caller*ID on Call Waiting&lt;br /&gt;
;&lt;br /&gt;
callwaitingcallerid=yes&lt;br /&gt;
;&lt;br /&gt;
; Support three-way calling&lt;br /&gt;
;&lt;br /&gt;
threewaycalling=yes&lt;br /&gt;
;&lt;br /&gt;
; Support flash-hook call transfer (requires three way calling)&lt;br /&gt;
; Also enables call parking (overrides the 'canpark' parameter)&lt;br /&gt;
;&lt;br /&gt;
transfer=yes&lt;br /&gt;
;&lt;br /&gt;
; Allow call parking&lt;br /&gt;
; ('canpark=no' is overridden by 'transfer=yes')&lt;br /&gt;
;&lt;br /&gt;
canpark=yes&lt;br /&gt;
;&lt;br /&gt;
; Support call forward variable&lt;br /&gt;
;&lt;br /&gt;
cancallforward=yes&lt;br /&gt;
;&lt;br /&gt;
; Whether or not to support Call Return (*69)&lt;br /&gt;
;&lt;br /&gt;
callreturn=yes&lt;br /&gt;
;&lt;br /&gt;
; Stutter dialtone support: If a mailbox is specified without a voicemail &lt;br /&gt;
; context, then when voicemail is received in a mailbox in the default &lt;br /&gt;
; voicemail context in voicemail.conf, taking the phone off hook will cause a&lt;br /&gt;
; stutter dialtone instead of a normal one. &lt;br /&gt;
;&lt;br /&gt;
; If a mailbox is specified *with* a voicemail context, the same will result&lt;br /&gt;
; if voicemail received in mailbox in the specified voicemail context.&lt;br /&gt;
;&lt;br /&gt;
; for default voicemail context, the example below is fine:&lt;br /&gt;
;&lt;br /&gt;
;mailbox=1234&lt;br /&gt;
;&lt;br /&gt;
; for any other voicemail context, the following will produce the stutter tone:&lt;br /&gt;
;&lt;br /&gt;
;mailbox=1234@context &lt;br /&gt;
;&lt;br /&gt;
; Enable echo cancellation &lt;br /&gt;
; Use either &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, or a power of two from 32 to 256 if you wish to&lt;br /&gt;
; actually set the number of taps of cancellation.&lt;br /&gt;
;&lt;br /&gt;
; Note that if any of your Zaptel cards have hardware echo cancellers,&lt;br /&gt;
; then this setting only turns them on and off; numeric settings will&lt;br /&gt;
; be treated as &amp;quot;yes&amp;quot;. There are no special settings required for&lt;br /&gt;
; hardware echo cancellers; when present and enabled in their kernel&lt;br /&gt;
; modules, they take precedence over the software echo canceller compiled&lt;br /&gt;
; into Zaptel automatically.&lt;br /&gt;
;&lt;br /&gt;
echocancel=yes&lt;br /&gt;
;&lt;br /&gt;
; Generally, it is not necessary (and in fact undesirable) to echo cancel when&lt;br /&gt;
; the circuit path is entirely TDM.  You may, however, change this behavior&lt;br /&gt;
; by enabling the echo cancel during pure TDM bridging below.&lt;br /&gt;
;&lt;br /&gt;
echocancelwhenbridged=yes&lt;br /&gt;
;&lt;br /&gt;
; In some cases, the echo canceller doesn't train quickly enough and there&lt;br /&gt;
; is echo at the beginning of the call.  Enabling echo training will cause&lt;br /&gt;
; asterisk to briefly mute the channel, send an impulse, and use the impulse&lt;br /&gt;
; response to pre-train the echo canceller so it can start out with a much&lt;br /&gt;
; closer idea of the actual echo.  Value may be &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;, or a number of&lt;br /&gt;
; milliseconds to delay before training (default = 400)&lt;br /&gt;
;&lt;br /&gt;
; Note that these parameters do not apply to hardware echo cancellers.&lt;br /&gt;
;&lt;br /&gt;
;echotraining=yes&lt;br /&gt;
;echotraining=800&lt;br /&gt;
;&lt;br /&gt;
; If you are having trouble with DTMF detection, you can relax the DTMF&lt;br /&gt;
; detection parameters.  Relaxing them may make the DTMF detector more likely&lt;br /&gt;
; to have &amp;quot;talkoff&amp;quot; where DTMF is detected when it shouldn't be.&lt;br /&gt;
;&lt;br /&gt;
;relaxdtmf=yes&lt;br /&gt;
;&lt;br /&gt;
; You may also set the default receive and transmit gains (in dB)&lt;br /&gt;
;&lt;br /&gt;
rxgain=0.0&lt;br /&gt;
txgain=0.0&lt;br /&gt;
;&lt;br /&gt;
; Logical groups can be assigned to allow outgoing rollover.  Groups range&lt;br /&gt;
; from 0 to 63, and multiple groups can be specified.&lt;br /&gt;
;&lt;br /&gt;
group=1&lt;br /&gt;
;&lt;br /&gt;
; Ring groups (a.k.a. call groups) and pickup groups.  If a phone is ringing&lt;br /&gt;
; and it is a member of a group which is one of your pickup groups, then&lt;br /&gt;
; you can answer it by picking up and dialling *8#.  For simple offices, just&lt;br /&gt;
; make these both the same.  Groups range from 0 to 63.&lt;br /&gt;
;&lt;br /&gt;
callgroup=1&lt;br /&gt;
pickupgroup=1&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Specify whether the channel should be answered immediately or if the simple&lt;br /&gt;
; switch should provide dialtone, read digits, etc.&lt;br /&gt;
;&lt;br /&gt;
immediate=no&lt;br /&gt;
;&lt;br /&gt;
; Specify whether flash-hook transfers to 'busy' channels should complete or&lt;br /&gt;
; return to the caller performing the transfer (default is yes).&lt;br /&gt;
;&lt;br /&gt;
;transfertobusy=no&lt;br /&gt;
;&lt;br /&gt;
; CallerID can be set to &amp;quot;asreceived&amp;quot; or a specific number if you want to&lt;br /&gt;
; override it.  Note that &amp;quot;asreceived&amp;quot; only applies to trunk interfaces.&lt;br /&gt;
;&lt;br /&gt;
;callerid=2564286000&lt;br /&gt;
;&lt;br /&gt;
; AMA flags affects the recording of Call Detail Records.  If specified&lt;br /&gt;
; it may be 'default', 'omit', 'billing', or 'documentation'.&lt;br /&gt;
;&lt;br /&gt;
;amaflags=default&lt;br /&gt;
;&lt;br /&gt;
; Channels may be associated with an account code to ease&lt;br /&gt;
; billing&lt;br /&gt;
;&lt;br /&gt;
;accountcode=lss0101&lt;br /&gt;
;&lt;br /&gt;
; ADSI (Analog Display Services Interface) can be enabled on a per-channel&lt;br /&gt;
; basis if you have (or may have) ADSI compatible CPE equipment&lt;br /&gt;
;&lt;br /&gt;
;adsi=yes&lt;br /&gt;
;&lt;br /&gt;
; On trunk interfaces (FXS) and E&amp;amp;M interfaces (E&amp;amp;M, Wink, Feature Group D&lt;br /&gt;
; etc, it can be useful to perform busy detection either in an effort to &lt;br /&gt;
; detect hangup or for detecting busies.  This enables listening for&lt;br /&gt;
; the beep-beep busy pattern.&lt;br /&gt;
;&lt;br /&gt;
;busydetect=yes&lt;br /&gt;
;&lt;br /&gt;
; If busydetect is enabled, it is also possible to specify how many busy tones&lt;br /&gt;
; to wait for before hanging up.  The default is 4, but better results can be&lt;br /&gt;
; achieved if set to 6 or even 8.  Mind that the higher the number, the more&lt;br /&gt;
; time that will be needed to hangup a channel, but lowers the probability&lt;br /&gt;
; that you will get random hangups.&lt;br /&gt;
;&lt;br /&gt;
;busycount=4&lt;br /&gt;
;&lt;br /&gt;
; If busydetect is enabled, it is also possible to specify the cadence of your&lt;br /&gt;
; busy signal.  In many countries, it is 500msec on, 500msec off.  Without&lt;br /&gt;
; busypattern specified, we'll accept any regular sound-silence pattern that&lt;br /&gt;
; repeats &amp;lt;busycount&amp;gt; times as a busy signal.  If you specify busypattern,&lt;br /&gt;
; then we'll further check the length of the sound (tone) and silence, which&lt;br /&gt;
; will further reduce the chance of a false positive.&lt;br /&gt;
;&lt;br /&gt;
;busypattern=500,500&lt;br /&gt;
;&lt;br /&gt;
; NOTE: In the Asterisk Makefile you'll find further options to tweak the busy&lt;br /&gt;
; detector.  If your country has a busy tone with the same length tone and&lt;br /&gt;
; silence (as many countries do), consider defining the&lt;br /&gt;
; -DBUSYDETECT_COMPARE_TONE_AND_SILENCE option.&lt;br /&gt;
;&lt;br /&gt;
; Use a polarity reversal to mark when a outgoing call is answered by the&lt;br /&gt;
; remote party.&lt;br /&gt;
;&lt;br /&gt;
;answeronpolarityswitch=yes&lt;br /&gt;
;&lt;br /&gt;
; In some countries, a polarity reversal is used to signal the disconnect of a&lt;br /&gt;
; phone line.  If the hanguponpolarityswitch option is selected, the call will&lt;br /&gt;
; be considered &amp;quot;hung up&amp;quot; on a polarity reversal.&lt;br /&gt;
;&lt;br /&gt;
;hanguponpolarityswitch=yes&lt;br /&gt;
;&lt;br /&gt;
; On trunk interfaces (FXS) it can be useful to attempt to follow the progress&lt;br /&gt;
; of a call through RINGING, BUSY, and ANSWERING.   If turned on, call&lt;br /&gt;
; progress attempts to determine answer, busy, and ringing on phone lines.&lt;br /&gt;
; This feature is HIGHLY EXPERIMENTAL and can easily detect false answers,&lt;br /&gt;
; so don't count on it being very accurate.&lt;br /&gt;
;&lt;br /&gt;
; Few zones are supported at the time of this writing, but may be selected&lt;br /&gt;
; with &amp;quot;progzone&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
; This feature can also easily detect false hangups. The symptoms of this is&lt;br /&gt;
; being disconnected in the middle of a call for no reason.&lt;br /&gt;
;&lt;br /&gt;
;callprogress=yes&lt;br /&gt;
;progzone=us&lt;br /&gt;
;&lt;br /&gt;
; FXO (FXS signalled) devices must have a timeout to determine if there was a&lt;br /&gt;
; hangup before the line was answered.  This value can be tweaked to shorten&lt;br /&gt;
; how long it takes before Zap considers a non-ringing line to have hungup.&lt;br /&gt;
;&lt;br /&gt;
;ringtimeout=8000&lt;br /&gt;
;&lt;br /&gt;
; For FXO (FXS signalled) devices, whether to use pulse dial instead of DTMF&lt;br /&gt;
;&lt;br /&gt;
;pulsedial=yes&lt;br /&gt;
;&lt;br /&gt;
; For fax detection, uncomment one of the following lines.  The default is *OFF*&lt;br /&gt;
;&lt;br /&gt;
;faxdetect=both&lt;br /&gt;
;faxdetect=incoming&lt;br /&gt;
;faxdetect=outgoing&lt;br /&gt;
;faxdetect=no&lt;br /&gt;
;&lt;br /&gt;
; Select which class of music to use for music on hold.  If not specified&lt;br /&gt;
; then the default will be used.&lt;br /&gt;
;&lt;br /&gt;
;musiconhold=default&lt;br /&gt;
;&lt;br /&gt;
; PRI channels can have an idle extension and a minunused number.  So long as&lt;br /&gt;
; at least &amp;quot;minunused&amp;quot; channels are idle, chan_zap will try to call &amp;quot;idledial&amp;quot;&lt;br /&gt;
; on them, and then dump them into the PBX in the &amp;quot;idleext&amp;quot; extension (which&lt;br /&gt;
; is of the form exten@context).  When channels are needed the &amp;quot;idle&amp;quot; calls&lt;br /&gt;
; are disconnected (so long as there are at least &amp;quot;minidle&amp;quot; calls still&lt;br /&gt;
; running, of course) to make more channels available.  The primary use of&lt;br /&gt;
; this is to create a dynamic service, where idle channels are bundled through&lt;br /&gt;
; multilink PPP, thus more efficiently utilizing combined voice/data services&lt;br /&gt;
; than conventional fixed mappings/muxings.&lt;br /&gt;
;&lt;br /&gt;
;idledial=6999&lt;br /&gt;
;idleext=6999@dialout&lt;br /&gt;
;minunused=2&lt;br /&gt;
;minidle=1&lt;br /&gt;
;&lt;br /&gt;
; Configure jitter buffers in zapata (each one is 20ms, default is 4)&lt;br /&gt;
;&lt;br /&gt;
;jitterbuffers=4&lt;br /&gt;
;&lt;br /&gt;
; You can define your own custom ring cadences here.  You can define up to 8&lt;br /&gt;
; pairs.  If the silence is negative, it indicates where the callerid spill is&lt;br /&gt;
; to be placed.  Also, if you define any custom cadences, the default cadences&lt;br /&gt;
; will be turned off.&lt;br /&gt;
;&lt;br /&gt;
; Syntax is:  cadence=ring,silence[,ring,silence[...]]&lt;br /&gt;
;&lt;br /&gt;
; These are the default cadences:&lt;br /&gt;
;&lt;br /&gt;
;cadence=125,125,2000,-4000&lt;br /&gt;
;cadence=250,250,500,1000,250,250,500,-4000&lt;br /&gt;
;cadence=125,125,125,125,125,-4000&lt;br /&gt;
;cadence=1000,500,2500,-5000&lt;br /&gt;
;&lt;br /&gt;
; Each channel consists of the channel number or range.  It inherits the&lt;br /&gt;
; parameters that were specified above its declaration.&lt;br /&gt;
;&lt;br /&gt;
; For GR-303, CRV's are created like channels except they must start with the&lt;br /&gt;
; trunk group followed by a colon, e.g.: &lt;br /&gt;
;&lt;br /&gt;
; crv =&amp;gt; 1:1&lt;br /&gt;
; crv =&amp;gt; 2:1-2,5-8&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
;callerid=&amp;quot;Green Phone&amp;quot;&amp;lt;(256) 428-6121&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 1&lt;br /&gt;
;callerid=&amp;quot;Black Phone&amp;quot;&amp;lt;(256) 428-6122&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 2&lt;br /&gt;
;callerid=&amp;quot;CallerID Phone&amp;quot; &amp;lt;(256) 428-6123&amp;gt;&lt;br /&gt;
;callerid=&amp;quot;CallerID Phone&amp;quot; &amp;lt;(630) 372-1564&amp;gt;&lt;br /&gt;
;callerid=&amp;quot;CallerID Phone&amp;quot; &amp;lt;(256) 704-4666&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 3&lt;br /&gt;
;callerid=&amp;quot;Pac Tel Phone&amp;quot; &amp;lt;(256) 428-6124&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 4&lt;br /&gt;
;callerid=&amp;quot;Uniden Dead&amp;quot; &amp;lt;(256) 428-6125&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 5&lt;br /&gt;
;callerid=&amp;quot;Cortelco 2500&amp;quot; &amp;lt;(256) 428-6126&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 6&lt;br /&gt;
;callerid=&amp;quot;Main TA 750&amp;quot; &amp;lt;(256) 428-6127&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 44&lt;br /&gt;
;&lt;br /&gt;
; For example, maybe we have some other channels which start out in a&lt;br /&gt;
; different context and use E &amp;amp; M signalling instead.&lt;br /&gt;
;&lt;br /&gt;
;context=remote&lt;br /&gt;
;sigalling=em&lt;br /&gt;
;channel =&amp;gt; 15&lt;br /&gt;
;channel =&amp;gt; 16&lt;br /&gt;
&lt;br /&gt;
;signalling=em_w&lt;br /&gt;
;&lt;br /&gt;
; All those in group 0 I'll use for outgoing calls&lt;br /&gt;
;&lt;br /&gt;
; Strip most significant digit (9) before sending&lt;br /&gt;
;&lt;br /&gt;
;stripmsd=1&lt;br /&gt;
;callerid=asreceived&lt;br /&gt;
;group=0&lt;br /&gt;
;signalling=fxs_ls&lt;br /&gt;
;channel =&amp;gt; 45&lt;br /&gt;
&lt;br /&gt;
;signalling=fxo_ls&lt;br /&gt;
;group=1&lt;br /&gt;
;callerid=&amp;quot;Joe Schmoe&amp;quot; &amp;lt;(256) 428-6131&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 25&lt;br /&gt;
;callerid=&amp;quot;Megan May&amp;quot; &amp;lt;(256) 428-6132&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 26&lt;br /&gt;
;callerid=&amp;quot;Suzy Queue&amp;quot; &amp;lt;(256) 428-6233&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 27&lt;br /&gt;
;callerid=&amp;quot;Larry Moe&amp;quot; &amp;lt;(256) 428-6234&amp;gt;&lt;br /&gt;
;channel =&amp;gt; 28&lt;br /&gt;
;&lt;br /&gt;
; Sample PRI (CPE) config:  Specify the switchtype, the signalling as either&lt;br /&gt;
; pri_cpe or pri_net for CPE or Network termination, and generally you will&lt;br /&gt;
; want to create a single &amp;quot;group&amp;quot; for all channels of the PRI.&lt;br /&gt;
;&lt;br /&gt;
; switchtype = national&lt;br /&gt;
; signalling = pri_cpe&lt;br /&gt;
; group = 2&lt;br /&gt;
; channel =&amp;gt; 1-23&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
;  Used for distinctive ring support for x100p.&lt;br /&gt;
;  You can see the dringX patterns is to set any one of the dringXcontext fields&lt;br /&gt;
;  and they will be printed on the console when an inbound call comes in.&lt;br /&gt;
;&lt;br /&gt;
;dring1=95,0,0 &lt;br /&gt;
;dring1context=internal1 &lt;br /&gt;
;dring2=325,95,0 &lt;br /&gt;
;dring2context=internal2 &lt;br /&gt;
; If no pattern is matched here is where we go.&lt;br /&gt;
;context=default&lt;br /&gt;
;channel =&amp;gt; 1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Variables</id>
		<title>Variables</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Variables"/>
				<updated>2007-09-04T13:38:20Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; The Asterisk Dialplan Variables&lt;br /&gt;
&lt;br /&gt;
There are two levels of parameter evaluation done in the Asterisk dial plan in extensions.conf.&lt;br /&gt;
* The first, and most frequently used, is the substitution of variable references with their values. &lt;br /&gt;
* Then there are the evaluations of expressions done in $[ .. ]. This will be discussed below.&lt;br /&gt;
&lt;br /&gt;
Asterisk has user-defined variables and standard variables set by various modules in Asterisk. These standard variables are listed at the end of this document.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PARAMETER QUOTING==&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; s,5,BackGround,blabla&lt;br /&gt;
&lt;br /&gt;
The parameter (blabla) can be quoted (&amp;quot;blabla&amp;quot;). In this case, a comma does not terminate the field. However, the double quotes will be passed down to the Background command, in this example.&lt;br /&gt;
&lt;br /&gt;
Also, characters special to variable substitution, expression evaluation, etc (see below), can be quoted. For example, to literally use a $ on the string &amp;quot;$1231&amp;quot;, quote it with a preceding \. Special characters that must be quoted to be used, are [ ] $ &amp;quot; \. (to write \ itself, use \\). &lt;br /&gt;
&lt;br /&gt;
These Double quotes and escapes are evaluated at the level of the asterisk config file parser. &lt;br /&gt;
&lt;br /&gt;
Double quotes can also be used inside expressions, as discussed below.&lt;br /&gt;
&lt;br /&gt;
==VARIABLES==&lt;br /&gt;
&lt;br /&gt;
Parameter strings can include variables. Variable names are arbitrary strings. They are stored in the respective channel structure. &lt;br /&gt;
&lt;br /&gt;
To set a variable to a particular value, do: &lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 1,2,Set(varname=value)&lt;br /&gt;
&lt;br /&gt;
You can substitute the value of a variable everywhere using ${variablename}. For example, to stringwise append $lala to $blabla and store result in $koko, do: &lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 1,2,Set(koko=${blabla}${lala})&lt;br /&gt;
&lt;br /&gt;
There are two reference modes - reference by value and reference by name. To refer to a variable with its name (as an argument to a function that requires a variable), just write the name. To refer to the variable's value, enclose it inside ${}. For example, Set takes as the first argument (before the =) a variable name, so: &lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 1,2,Set(koko=lala)&lt;br /&gt;
 exten =&amp;gt; 1,3,Set(${koko}=blabla)&lt;br /&gt;
&lt;br /&gt;
stores to the variable &amp;quot;koko&amp;quot; the value &amp;quot;lala&amp;quot; and to variable &amp;quot;lala&amp;quot; the value &amp;quot;blabla&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
In fact, everything contained ${here} is just replaced with the value of the variable &amp;quot;here&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==VARIABLE INHERITANCE==&lt;br /&gt;
&lt;br /&gt;
Variable names which are prefixed by &amp;quot;_&amp;quot; will be inherited to channels that are created in the process of servicing the original channel in which the variable was set.  When the inheritance takes place, the &lt;br /&gt;
prefix will be removed in the channel inheriting the variable.  If the name is prefixed by &amp;quot;__&amp;quot; in the channel, then the variable is inherited and the &amp;quot;__&amp;quot; will remain intact in the new channel.&lt;br /&gt;
&lt;br /&gt;
In the dialplan, all references to these variables refer to the same variable, regardless of having a prefix or not.  Note that setting any version of the variable removes any other version of the variable, regardless of prefix.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Set(__FOO=bar) ; Sets an inherited version of &amp;quot;FOO&amp;quot; variable &lt;br /&gt;
Set(FOO=bar)   ; Removes the inherited version and sets a local &lt;br /&gt;
               ; variable.&lt;br /&gt;
&lt;br /&gt;
However,&lt;br /&gt;
&lt;br /&gt;
NoOp(${__FOO}) is identical to NoOp(${FOO})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SELECTING CHARACTERS FROM VARIABLES==&lt;br /&gt;
&lt;br /&gt;
The format for selecting characters from a variable can be expressed as:&lt;br /&gt;
&lt;br /&gt;
 ${variable_name[:offset[:length]]}&lt;br /&gt;
&lt;br /&gt;
If you want to select the first N characters from the string assigned to a variable, simply append a colon and the number of characters to skip from the beginning of the string to the variable name.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	;Remove the first character of extension, save in &amp;quot;number&amp;quot; variable&lt;br /&gt;
	exten =&amp;gt; _9X.,1,Set(number=${EXTEN:1})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Assuming we've dialed 918005551234, the value saved to the 'number' variable would be 18005551234. This is useful in situations when we require users to dial a number to access an outside line, but do not wish to pass the first digit.&lt;br /&gt;
&lt;br /&gt;
If you use a negative offset number, Asterisk starts counting from the end of the string and then selects everything after the new position. The following example will save the numbers 1234 to the 'number' variable, still assuming we've dialed 918005551234.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	;Remove everything before the last four digits of the dialed string&lt;br /&gt;
	exten =&amp;gt; _9X.,1,Set(number=${EXTEN:-4})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can also limit the number of characters from our offset position that we wish to use. This is done by appending a second colon and length value to the variable name. The following example will save the numbers 555 to the 'number' variable.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	;Only save the middle numbers 555 from the string 918005551234&lt;br /&gt;
	exten =&amp;gt; _9X.,1,Set(number=${EXTEN:5:3})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The length value can also be used in conjunction with a negative offset. This may be useful if the length of the string is unknown, but the trailing digits are. The following example will save the numbers 555 to the 'number' variable, even if the string starts with more characters than expected (unlike the previous example).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	;Save the numbers 555 to the 'number' variable&lt;br /&gt;
	exten =&amp;gt; _9X.,1,Set(number=${EXTEN:-7:3})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If a negative length value is entered, it is ignored and Asterisk will match to the end of the string.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==EXPRESSIONS==&lt;br /&gt;
&lt;br /&gt;
Everything contained inside a bracket pair prefixed by a $ (like $[this]) is considered as an expression and it is evaluated. Evaluation works similar to (but is done on a later stage than) variable substitution: the expression (including the square brackets) is replaced by the result of the expression evaluation. &lt;br /&gt;
&lt;br /&gt;
For example, after the sequence: &lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 1,1,Set(lala=$[1 + 2])&lt;br /&gt;
 exten =&amp;gt; 1,2,Set(koko=$[2 * ${lala}])&lt;br /&gt;
&lt;br /&gt;
the value of variable koko is &amp;quot;6&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
and, further:&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 1,1,Set,(lala=$[  1 +    2   ]);&lt;br /&gt;
&lt;br /&gt;
will parse as intended. Extra spaces are ignored.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==SPACES INSIDE VARIABLE VALUES==&lt;br /&gt;
&lt;br /&gt;
If the variable being evaluated contains spaces, there can be problems.&lt;br /&gt;
&lt;br /&gt;
For these cases, double quotes around text that may contain spaces will force the surrounded text to be evaluated as a single token. The double quotes will be counted as part of that lexical token.&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; s,6,GotoIf($[ &amp;quot;${CALLERIDNAME}&amp;quot; : &amp;quot;Privacy Manager&amp;quot; ]?callerid-liar|s|1:s|7)&lt;br /&gt;
&lt;br /&gt;
The variable CALLERIDNAME could evaluate to &amp;quot;DELOREAN MOTORS&amp;quot; (with a space) but the above will evaluate to:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;DELOREAN MOTORS&amp;quot; : &amp;quot;Privacy Manager&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and will evaluate to 0.&lt;br /&gt;
&lt;br /&gt;
The above without double quotes would have evaluated to:&lt;br /&gt;
&lt;br /&gt;
DELOREAN MOTORS : Privacy Manager&lt;br /&gt;
&lt;br /&gt;
and will result in syntax errors, because token DELOREAN is immediately followed by token MOTORS and the expression parser will not know how to evaluate this expression, because it does not match its grammar.&lt;br /&gt;
&lt;br /&gt;
==OPERATORS==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Operators are listed below in order of increasing precedence.  Operators&lt;br /&gt;
with equal precedence are grouped within { } symbols.&lt;br /&gt;
&lt;br /&gt;
     expr1 | expr2&lt;br /&gt;
             Return the evaluation of expr1 if it is neither an empty string&lt;br /&gt;
             nor zero; otherwise, returns the evaluation of expr2.&lt;br /&gt;
&lt;br /&gt;
     expr1 &amp;amp; expr2&lt;br /&gt;
             Return the evaluation of expr1 if neither expression evaluates to&lt;br /&gt;
             an empty string or zero; otherwise, returns zero.&lt;br /&gt;
&lt;br /&gt;
     expr1 {=, &amp;gt;, &amp;gt;=, &amp;lt;, &amp;lt;=, !=} expr2&lt;br /&gt;
             Return the results of integer comparison if both arguments are&lt;br /&gt;
             integers; otherwise, returns the results of string comparison&lt;br /&gt;
             using the locale-specific collation sequence.  The result of each&lt;br /&gt;
             comparison is 1 if the specified relation is true, or 0 if the&lt;br /&gt;
             relation is false.&lt;br /&gt;
&lt;br /&gt;
     expr1 {+, -} expr2&lt;br /&gt;
             Return the results of addition or subtraction of integer-valued&lt;br /&gt;
             arguments.&lt;br /&gt;
&lt;br /&gt;
     expr1 {*, /, %} expr2&lt;br /&gt;
             Return the results of multiplication, integer division, or&lt;br /&gt;
             remainder of integer-valued arguments.&lt;br /&gt;
&lt;br /&gt;
     - expr1&lt;br /&gt;
            Return the result of subtracting expr1 from 0.&lt;br /&gt;
            This, the unary minus operator, is right associative, and&lt;br /&gt;
            has the same precedence as the ! operator.&lt;br /&gt;
&lt;br /&gt;
     expr1 : expr2&lt;br /&gt;
             The `:' operator matches expr1 against expr2, which must be a&lt;br /&gt;
             regular expression.  The regular expression is anchored to the&lt;br /&gt;
             beginning of  the string with an implicit `^'.&lt;br /&gt;
&lt;br /&gt;
             If the match succeeds and the pattern contains at least one regu-&lt;br /&gt;
             lar expression subexpression `\(...\)', the string correspond-&lt;br /&gt;
             ing to `\1' is returned; otherwise the matching operator&lt;br /&gt;
             returns the number of characters matched.  If the match fails and&lt;br /&gt;
             the pattern contains a regular expression subexpression the null&lt;br /&gt;
             string is returned; otherwise 0.&lt;br /&gt;
&lt;br /&gt;
             Normally, the double quotes wrapping a string are left as part&lt;br /&gt;
             of the string. This is disastrous to the : operator. Therefore,&lt;br /&gt;
             before the regex match is made, beginning and ending double quote&lt;br /&gt;
             characters are stripped from both the pattern and the string.&lt;br /&gt;
&lt;br /&gt;
      expr1 ? expr2 :: expr3&lt;br /&gt;
             Traditional Conditional operator. If expr1 is a number&lt;br /&gt;
	     that evaluates to 0 (false), expr3 is result of the this&lt;br /&gt;
	     expression evaluation.  Otherwise, expr2 is the result.&lt;br /&gt;
	     If expr1 is a string, and evaluates to an empty string,&lt;br /&gt;
	     or the two characters (&amp;quot;&amp;quot;), then expr3 is the&lt;br /&gt;
	     result. Otherwise, expr2 is the result.  In Asterisk, all&lt;br /&gt;
	     3 exprs will be &amp;quot;evaluated&amp;quot;; if expr1 is &amp;quot;true&amp;quot;, expr2&lt;br /&gt;
	     will be the result of the &amp;quot;evaluation&amp;quot; of this&lt;br /&gt;
	     expression.  expr3 will be the result otherwise. This&lt;br /&gt;
	     operator has the lowest precedence.&lt;br /&gt;
&lt;br /&gt;
Parentheses are used for grouping in the usual manner.&lt;br /&gt;
&lt;br /&gt;
Operator precedence is applied as one would expect in any of the C&lt;br /&gt;
or C derived languages.&lt;br /&gt;
&lt;br /&gt;
Examples&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;One Thousand Five Hundred&amp;quot; : &amp;quot;T[^ ]+&amp;quot;&lt;br /&gt;
	returns: 0&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;8015551212&amp;quot; : &amp;quot;(...)&amp;quot;&lt;br /&gt;
	returns: 801&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;3075551212&amp;quot;:&amp;quot;...(...)&amp;quot;&lt;br /&gt;
	returns: 555&lt;br /&gt;
&lt;br /&gt;
 !( &amp;quot;One Thousand Five Hundred&amp;quot; : &amp;quot;T[^ ]+&amp;quot; )&lt;br /&gt;
	returns: 1  (because the string doesn't start with a word starting&lt;br /&gt;
                     with T, so the match evals to 0, and the ! operator&lt;br /&gt;
                     inverts it to 1 ).&lt;br /&gt;
&lt;br /&gt;
 2 + 8 / 2&lt;br /&gt;
	returns 6. (because of operator precedence; the division is done first, then the addition).&lt;br /&gt;
&lt;br /&gt;
 2+8/2&lt;br /&gt;
	returns 6. Spaces aren't necessary.&lt;br /&gt;
&lt;br /&gt;
(2+8)/2&lt;br /&gt;
	returns 5, of course.&lt;br /&gt;
&lt;br /&gt;
Of course, all of the above examples use constants, but would work the&lt;br /&gt;
same if any of the numeric or string constants were replaced with a&lt;br /&gt;
variable reference ${CALLERIDNUM}, for instance.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==NUMBERS VS STRINGS==&lt;br /&gt;
&lt;br /&gt;
Tokens consisting only of numbers are converted to 64-bit numbers for most of the operators. This means that overflows can occur when the numbers get above 18 digits.  Warnings will appear in the logs in this case.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CONDITIONALS==&lt;br /&gt;
&lt;br /&gt;
There is one conditional application - the conditional goto : &lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 1,2,gotoif(condition?label1:label2)&lt;br /&gt;
&lt;br /&gt;
If condition is true go to label1, else go to label2. Labels are interpreted exactly as in the normal goto command.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;condition&amp;quot; is just a string. If the string is empty or &amp;quot;0&amp;quot;, the condition is considered to be false, if it's anything else, the condition is true. This is designed to be used together with the expression syntax described above, eg : &lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 1,2,gotoif($[${CALLERID} = 123456]?2|1:3|1)&lt;br /&gt;
&lt;br /&gt;
Example of use : &lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; s,2,Set(vara=1)&lt;br /&gt;
 exten =&amp;gt; s,3,Set(varb=$[${vara} + 2])&lt;br /&gt;
 exten =&amp;gt; s,4,Set(varc=$[${varb} * 2])&lt;br /&gt;
 exten =&amp;gt; s,5,GotoIf($[${varc} = 6]?99|1:s|6)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==PARSE ERRORS==&lt;br /&gt;
&lt;br /&gt;
Syntax errors are now output with 3 lines.&lt;br /&gt;
&lt;br /&gt;
If the extensions.conf file contains a line like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
exten =&amp;gt; s,6,GotoIf($[ &amp;quot;${CALLERIDNUM}&amp;quot;  = &amp;quot;3071234567&amp;quot; &amp;amp; &amp;amp;  &amp;quot;${CALLERIDNAME}&amp;quot; : &amp;quot;Privacy Manager&amp;quot; ]?callerid-liar|s|1:s|7)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You may see an error in /var/log/asterisk/messages like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Jul 15 21:27:49 WARNING[1251240752]: ast_yyerror(): syntax error: parse error, unexpected TOK_AND, expecting TOK_MINUS or TOK_LP or TOKEN; Input:&lt;br /&gt;
&amp;quot;3072312154&amp;quot;  = &amp;quot;3071234567&amp;quot; &amp;amp; &amp;amp; &amp;quot;Steves Extension&amp;quot; : &amp;quot;Privacy Manager&amp;quot; &lt;br /&gt;
                               ^&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The log line tells you that a syntax error was encountered. It now also tells you (in grand standard bison format) that it hit an &amp;quot;AND&amp;quot; (&amp;amp;) token unexpectedly, and that was hoping for for a MINUS (-), LP&lt;br /&gt;
(left parenthesis), or a plain token (a string or number).&lt;br /&gt;
&lt;br /&gt;
The next line shows the evaluated expression, and the line after that, the position of the parser in the expression when it became confused, marked with the &amp;quot;^&amp;quot; character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==NULL STRINGS==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Testing to see if a string is null can be done in one of two different ways:&lt;br /&gt;
&lt;br /&gt;
	exten =&amp;gt; _XX.,1,GotoIf($[&amp;quot;${calledid}&amp;quot; != &amp;quot;&amp;quot;]?3) &lt;br /&gt;
&lt;br /&gt;
	exten =&amp;gt; _XX.,1,GotoIf($[foo${calledid} != foo]?3) &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second example above is the way suggested by the WIKI. It will work as long as there are no spaces in the evaluated value.&lt;br /&gt;
&lt;br /&gt;
The first way should work in all cases, and indeed, might now be the safest way to handle this situation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==WARNING==&lt;br /&gt;
&lt;br /&gt;
If you need to do complicated things with strings, asterisk expressions is most likely NOT the best way to go about it. AGI scripts are an excellent option to this need, and make available the full power of&lt;br /&gt;
whatever language you desire, be it Perl, C, C++, Cobol, RPG, Java, Snobol, PL/I, Scheme, Common Lisp, Shell scripts, Tcl, Forth, Modula, Pascal, APL, assembler, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==INCOMPATIBILITIES==&lt;br /&gt;
&lt;br /&gt;
The asterisk expression parser has undergone some evolution. It is hoped that the changes will be viewed as positive. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;original&amp;quot; expression parser had a simple, hand-written scanner, and a simple bison grammar. This was upgraded to a more involved bison grammar, and a hand-written scanner upgraded to allow extra spaces, and to generate better error diagnostics. This upgrade required bison 1.85, and part of the user community felt the pain of having to upgrade their bison version.&lt;br /&gt;
&lt;br /&gt;
The next upgrade included new bison and flex input files, and the makefile was upgraded to detect current version of both flex and bison, conditionally compiling and linking the new files if the versions of flex and bison would allow it.&lt;br /&gt;
&lt;br /&gt;
If you have not touched your extensions.conf files in a year or so, the above upgrades may cause you some heartburn in certain circumstances, as several changes have been made, and these will affect asterisk's behavior on legacy extension.conf constructs.  The changes have been engineered&lt;br /&gt;
to minimize these conflicts, but there are bound to be problems.&lt;br /&gt;
&lt;br /&gt;
The following list gives some (and most likely, not all) of areas of possible concern with &amp;quot;legacy&amp;quot; extension.conf files:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1. Tokens separated by space(s).&lt;br /&gt;
   Previously, tokens were separated by spaces. Thus, ' 1 + 1 ' would evaluate&lt;br /&gt;
   to the value '2', but '1+1' would evaluate to the string '1+1'. If this&lt;br /&gt;
   behavior was depended on, then the expression evaluation will break. '1+1'&lt;br /&gt;
   will now evaluate to '2', and something is not going to work right.&lt;br /&gt;
   To keep such strings from being evaluated, simply wrap them in double &lt;br /&gt;
   quotes: '  &amp;quot;1+1&amp;quot; '&lt;br /&gt;
&lt;br /&gt;
2. The colon operator. In versions previous to double quoting, the&lt;br /&gt;
   colon operator takes the right hand string, and using it as a &lt;br /&gt;
   regex pattern, looks for it in the left hand string. It is given&lt;br /&gt;
   an implicit ^ operator at the beginning, meaning the pattern &lt;br /&gt;
   will match only at the beginning of the left hand string. &lt;br /&gt;
   If the pattern or the matching string had double quotes around&lt;br /&gt;
   them, these could get in the way of the pattern match. Now,&lt;br /&gt;
   the wrapping double quotes are stripped from both the pattern &lt;br /&gt;
   and the left hand string before applying the pattern. This&lt;br /&gt;
   was done because it recognized that the new way of&lt;br /&gt;
   scanning the expression doesn't use spaces to separate tokens,&lt;br /&gt;
   and the average regex expression is full of operators that &lt;br /&gt;
   the scanner will recognize as expression operators. Thus, unless&lt;br /&gt;
   the pattern is wrapped in double quotes, there will be trouble.&lt;br /&gt;
   For instance,      ${VAR1} : (Who|What*)+&lt;br /&gt;
   may have have worked before, but unless you wrap the pattern&lt;br /&gt;
   in double quotes now, look out for trouble! This is better:&lt;br /&gt;
         &amp;quot;${VAR1}&amp;quot; : &amp;quot;(Who|What*)+&amp;quot;&lt;br /&gt;
   and should work as previous.&lt;br /&gt;
&lt;br /&gt;
3. Variables and Double Quotes&lt;br /&gt;
   Before these changes, if a variable's value contained one or more double&lt;br /&gt;
   quotes, it was no reason for concern. It is now!&lt;br /&gt;
&lt;br /&gt;
4. LE, GE, NE operators removed. The code supported these operators,&lt;br /&gt;
   but they were not documented. The symbolic operators, &amp;lt;=, &amp;gt;=, and !=&lt;br /&gt;
   should be used instead.&lt;br /&gt;
&lt;br /&gt;
5.  Added the unary '-' operator. So you can 3+ -4 and get -1.&lt;br /&gt;
&lt;br /&gt;
6.  Added the unary '!' operator, which is a logical complement.&lt;br /&gt;
    Basically, if the string or number is null, empty, or '0',&lt;br /&gt;
    a '1' is returned. Otherwise a '0' is returned.&lt;br /&gt;
&lt;br /&gt;
7.  Added the '=~' operator, just in case someone is just looking for&lt;br /&gt;
    match anywhere in the string. The only diff with the ':' is that&lt;br /&gt;
    match doesn't have to be anchored to the beginning of the string.&lt;br /&gt;
&lt;br /&gt;
8.  Added the conditional operator  'expr1 ? true_expr :: false_expr'&lt;br /&gt;
    First, all 3 exprs are evaluated, and if expr1 is false, the 'false_expr'&lt;br /&gt;
    is returned as the result. See above for details. &lt;br /&gt;
&lt;br /&gt;
9.  Unary operators '-' and '!' were made right associative.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==DEBUGGING==&lt;br /&gt;
&lt;br /&gt;
;HINTS FOR $[  ]  EXPRESSIONS&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There are two utilities you can build to help debug the $[ ] in your extensions.conf file.&lt;br /&gt;
&lt;br /&gt;
The first, and most simplistic, is to issue the command:&lt;br /&gt;
&lt;br /&gt;
 make testexpr2&lt;br /&gt;
&lt;br /&gt;
in the top level asterisk source directory. This will build a small executable, that is able to take the first command line argument, and run it thru the expression parser. No variable substitutions will be performed. It might be safest to wrap the expression in single quotes...&lt;br /&gt;
&lt;br /&gt;
 testexpr2 '2*2+2/2'&lt;br /&gt;
&lt;br /&gt;
is an example.&lt;br /&gt;
&lt;br /&gt;
And, in the utils directory, you can say:&lt;br /&gt;
&lt;br /&gt;
 make check_expr&lt;br /&gt;
&lt;br /&gt;
and a small program will be built, that will check the file mentioned in the first command line argument, for any expressions that might be have problems when you move to flex-2.5.31.  It was originally designed to help spot possible incompatibilities when moving from the&lt;br /&gt;
pre-2.5.31 world to the upgraded version of the lexer. But one more capability has been added to check_expr, that might make it more generally useful. It now does a simple minded evaluation of&lt;br /&gt;
all variables, and then passes the $[] exprs to the parser. If there are any parse errors, they will be reported in the log file. You can use check_expr to do a quick sanity check of the expressions in your&lt;br /&gt;
extensions.conf file, to see if they pass a crude syntax check.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;simple-minded&amp;quot; variable substitution replaces ${varname} variable references with '555'. You can override the 555 for variable values, by entering in var=val arguments after the filename on the command line.  So...&lt;br /&gt;
&lt;br /&gt;
 check_expr /etc/asterisk/extensions.conf CALLERIDNUM=3075551212 DIALSTATUS=TORTURE EXTEN=121&lt;br /&gt;
&lt;br /&gt;
will substitute any ${CALLERIDNUM} variable references with 3075551212, any ${DIALSTATUS} variable references with 'TORTURE', and any ${EXTEN} references with '121'. If there is any fancy stuff going on in the reference, like ${EXTEN:2}, then the override will not work. Everything in the ${...} has to match. So, to substitute #{EXTEN:2} references, you'd best say:&lt;br /&gt;
&lt;br /&gt;
 check_expr /etc/asterisk/extensions.conf CALLERIDNUM=3075551212 DIALSTATUS=TORTURE EXTEN:2=121&lt;br /&gt;
&lt;br /&gt;
on stdout, you will see something like:&lt;br /&gt;
&lt;br /&gt;
 OK -- $[ &amp;quot;${DIALSTATUS}&amp;quot;  = &amp;quot;TORTURE&amp;quot; | &amp;quot;${DIALSTATUS}&amp;quot; = &amp;quot;DONTCALL&amp;quot; ] at line 416&lt;br /&gt;
&lt;br /&gt;
In the expr2_log file that is generated, you will see:&lt;br /&gt;
&lt;br /&gt;
 line 416, evaluation of $[  &amp;quot;TORTURE&amp;quot;  = &amp;quot;TORTURE&amp;quot; | &amp;quot;TORTURE&amp;quot; = &amp;quot;DONTCALL&amp;quot;  ] result: 1&lt;br /&gt;
&lt;br /&gt;
check_expr is a very simplistic algorithm, and it is far from being guaranteed to work in all cases, but it is hoped that it will be useful.&lt;br /&gt;
&lt;br /&gt;
==Asterisk standard channel variables==&lt;br /&gt;
&lt;br /&gt;
There are a number of variables that are defined or read by Asterisk. Here is a list of them. More information is available in each application's help text. All these variables are in UPPER CASE only.&lt;br /&gt;
&lt;br /&gt;
Variables marked with a * are builtin functions and can't be set, only read in the dialplan.  Writes to such variables are silently ignored.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${ACCOUNTCODE} 	 	* Account code (if specified) (Deprecated; use ${CDR(accountcode)})&lt;br /&gt;
${BLINDTRANSFER} 	The name of the channel on the other side of a blind transfer&lt;br /&gt;
${BRIDGEPEER}	 	Bridged peer&lt;br /&gt;
${CALLERANI}	 	* Caller ANI (PRI channels) (Deprecated; use ${CALLERID(ani)})&lt;br /&gt;
${CALLERID}	 	* Caller ID (Deprecated; use ${CALLERID(all)})&lt;br /&gt;
${CALLERIDNAME}	 	* Caller ID Name only (Deprecated; use ${CALLERID(name)})&lt;br /&gt;
${CALLERIDNUM}	 	* Caller ID Number only (Deprecated; use ${CALLERID(num)})&lt;br /&gt;
${CALLINGANI2}	 	* Caller ANI2 (PRI channels)&lt;br /&gt;
${CALLINGPRES}	 	* Caller ID presentation for incoming calls (PRI channels)&lt;br /&gt;
${CALLINGTNS} 	 	* Transit Network Selector (PRI channels)&lt;br /&gt;
${CALLINGTON}    	* Caller Type of Number (PRI channels)&lt;br /&gt;
${CHANNEL}	 	* Current channel name&lt;br /&gt;
${CONTEXT}       	* Current context&lt;br /&gt;
${DATETIME}	 	* Current date time in the format: DDMMYYYY-HH:MM:SS (Deprecated; use ${STRFTIME(${EPOCH},,%d%m%Y-%H:%M:%S)})&lt;br /&gt;
${DB_RESULT}		Result value of DB_EXISTS() dial plan function&lt;br /&gt;
${DNID}          	* Dialed Number Identifier (Deprecated; use ${CALLERID(dnid)})&lt;br /&gt;
${EPOCH}	 	* Current unix style epoch&lt;br /&gt;
${EXTEN}	 	* Current extension&lt;br /&gt;
${ENV(VAR)}	 	Environmental variable VAR&lt;br /&gt;
${GOTO_ON_BLINDXFR}	Transfer to the specified context/extension/priority&lt;br /&gt;
			after a blind transfer (use ^ characters in place of&lt;br /&gt;
			| to separate context/extension/priority when setting&lt;br /&gt;
			this variable from the dialplan)&lt;br /&gt;
${HANGUPCAUSE}	 	* Asterisk cause of hangup (inbound/outbound)&lt;br /&gt;
${HINT}          	* Channel hints for this extension&lt;br /&gt;
${HINTNAME}      	* Suggested Caller*ID name for this extension&lt;br /&gt;
${INVALID_EXTEN} 	The invalid called extension (used in the &amp;quot;i&amp;quot; extension)&lt;br /&gt;
${LANGUAGE}	 	* Current language (Deprecated; use ${LANGUAGE()})&lt;br /&gt;
${LEN(VAR)}	 	* String length of VAR (integer)&lt;br /&gt;
${PRIORITY}	 	* Current priority in the dialplan&lt;br /&gt;
${PRIREDIRECTREASON} 	Reason for redirect on PRI, if a call was directed&lt;br /&gt;
${RDNIS}         	* Redirected Dial Number ID Service (Deprecated; use ${CALLERID(rdnis)})&lt;br /&gt;
${TIMESTAMP}	 	* Current date time in the format: YYYYMMDD-HHMMSS (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)})&lt;br /&gt;
${TRANSFER_CONTEXT} 	Context for transferred calls&lt;br /&gt;
${UNIQUEID}	 	* Current call unique identifier&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Application return values&lt;br /&gt;
----&lt;br /&gt;
In Asterisk 1.2, many applications return the result in a variable instead of, as in Asterisk 1.0, changing the dial plan priority (+101). For the various status values, see each application's help text.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${AQMSTATUS}			* addqueuemember()&lt;br /&gt;
${AVAILSTATUS}			* chanisavail()&lt;br /&gt;
${CHECKGROUPSTATUS}		* checkgroup()&lt;br /&gt;
${CHECKMD5STATUS}		* checkmd5()&lt;br /&gt;
${CPLAYBACKSTATUS}		* controlplayback()&lt;br /&gt;
${DIALSTATUS}   		* dial()&lt;br /&gt;
${DBGETSTATUS}			* dbget()&lt;br /&gt;
${ENUMSTATUS}			* enumlookup()&lt;br /&gt;
${HASVMSTATUS}			* hasnewvoicemail()&lt;br /&gt;
${LOOKUPBLSTATUS}		* lookupblacklist()&lt;br /&gt;
${OSPLOOKUPSTATUS}		* osplookup()&lt;br /&gt;
${OSPNEXTSTATUS}		* ospnext()&lt;br /&gt;
${OSPFINISHSTATUS}		* ospfinish()&lt;br /&gt;
${PLAYBACKSTATUS}		* playback()&lt;br /&gt;
${PQMSTATUS}			* pausequeuemember()&lt;br /&gt;
${PRIVACYMGRSTATUS}		* privacymanager()&lt;br /&gt;
${QUEUESTATUS}			* queue()&lt;br /&gt;
${RQMSTATUS}			* removequeuemember()&lt;br /&gt;
${SENDIMAGESTATUS}		* sendimage()&lt;br /&gt;
${SENDTEXTSTATUS}		* sendtext()&lt;br /&gt;
${SENDURLSTATUS}		* sendurl()&lt;br /&gt;
${SIPGETSTATUS}			* sipgetheader()&lt;br /&gt;
${SYSTEMSTATUS}			* system()&lt;br /&gt;
${TRANSFERSTATUS}		* transfer()&lt;br /&gt;
${TXTCIDNAMESTATUS}		* txtcidname()&lt;br /&gt;
${UPQMSTATUS}			* unpausequeuemember()&lt;br /&gt;
${VMSTATUS}			* voicmail()&lt;br /&gt;
${VMBOXEXISTSSTATUS}		* vmboxexists()&lt;br /&gt;
${WAITSTATUS}			* waitforsilence()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Various application variables&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${CURL}			* Resulting page content for curl()&lt;br /&gt;
${ENUM}			* Result of application EnumLookup&lt;br /&gt;
${EXITCONTEXT}		Context to exit to in IVR menu (app background())&lt;br /&gt;
			or in the RetryDial() application&lt;br /&gt;
${MONITOR}		* Set to &amp;quot;TRUE&amp;quot; if the channel is/has been monitored (app monitor())&lt;br /&gt;
${MONITOR_EXEC}		Application to execute after monitoring a call&lt;br /&gt;
${MONITOR_EXEC_ARGS}	Arguments to application&lt;br /&gt;
${MONITOR_FILENAME} 	File for monitoring (recording) calls in queue&lt;br /&gt;
${QUEUE_PRIO}		Queue priority&lt;br /&gt;
${QUEUESTATUS} 		Status of the call, one of:&lt;br /&gt;
			(TIMEOUT | FULL | JOINEMPTY | LEAVEEMPTY | JOINUNAVAIL | LEAVEUNAVAIL)&lt;br /&gt;
${RECORDED_FILE} 	* Recorded file in record()&lt;br /&gt;
${TALK_DETECTED} 	* Result from talkdetect()&lt;br /&gt;
${TOUCH_MONITOR} 	The filename base to use with Touch Monitor (auto record)&lt;br /&gt;
${TOUCH_MONITOR_FORMAT} The audio format to use with Touch Monitor (auto record)&lt;br /&gt;
${TXTCIDNAME}		* Result of application TXTCIDName&lt;br /&gt;
${VPB_GETDTMF}		chan_vpb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The MeetMe Conference Bridge uses the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${MEETME_RECORDINGFILE} 	Name of file for recording a conference with &lt;br /&gt;
				the &amp;quot;r&amp;quot; option&lt;br /&gt;
${MEETME_RECORDINGFORMAT} 	Format of file to be recorded&lt;br /&gt;
${MEETME_EXIT_CONTEXT} 		Context for exit out of meetme meeting&lt;br /&gt;
${MEETME_AGI_BACKGROUND} 	AGI script for Meetme (zap only)&lt;br /&gt;
${MEETMESECS} 			* Number of seconds a user participated in a MeetMe conference&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The VoiceMail() application uses the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${VM_CATEGORY}		Sets voicemail category&lt;br /&gt;
${VM_NAME}		* Full name in voicemail&lt;br /&gt;
${VM_DUR}		* Voicemail duration&lt;br /&gt;
${VM_MSGNUM}		* Number of voicemail message in mailbox&lt;br /&gt;
${VM_CALLERID}		* Voicemail Caller ID (Person leaving vm)&lt;br /&gt;
${VM_CIDNAME}		* Voicemail Caller ID Name&lt;br /&gt;
${VM_CIDNUM}		* Voicemail Caller ID Number&lt;br /&gt;
${VM_DATE}		* Voicemail Date&lt;br /&gt;
${VM_MESSAGEFILE}	* Path to message left by caller&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The VMAuthenticate() application uses the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${AUTH_MAILBOX}	* Authenticated mailbox&lt;br /&gt;
${AUTH_CONTEXT}	* Authenticated mailbox context&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
DUNDiLookup() uses the following variables&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${DUNDTECH}	* The Technology of the result from a call to DUNDiLookup()&lt;br /&gt;
${DUNDDEST}	* The Destination of the result from a call to DUNDiLookup()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Zaptel channel sets the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${ANI2}			* The ANI2 Code provided by the network on the incoming call. &lt;br /&gt;
			(ie, Code 29 identifies call as a Prison/Inmate Call)&lt;br /&gt;
${CALLTYPE}		* Type of call (Speech, Digital, etc)&lt;br /&gt;
${CALLEDTON}		* Type of number for incoming PRI extension&lt;br /&gt;
			i.e. 0=unknown, 1=international, 2=domestic, 3=net_specific, &lt;br /&gt;
			4=subscriber, 6=abbreviated, 7=reserved &lt;br /&gt;
${CALLINGSUBADDR}	* Called PRI Subaddress&lt;br /&gt;
${FAXEXTEN}	 	* The extension called before being redirected to &amp;quot;fax&amp;quot;	&lt;br /&gt;
${PRIREDIRECTREASON}	* Reason for redirect, if a call was directed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SIP channel uses the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${SIPCALLID} 		* SIP Call-ID: header verbatim (for logging or CDR matching)&lt;br /&gt;
${SIPDOMAIN}    	* SIP destination domain of an inbound call (if appropriate)&lt;br /&gt;
${SIPUSERAGENT} 	* SIP user agent &lt;br /&gt;
${SIPURI}		* SIP uri&lt;br /&gt;
${SIP_CODEC} 		Set the SIP codec for a call	&lt;br /&gt;
${SIP_URI_OPTIONS}	* additional options to add to the URI for an outgoing call&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Agent channel uses the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${AGENTMAXLOGINTRIES}	Set the maximum number of failed logins&lt;br /&gt;
${AGENTUPDATECDR}	Whether to update the CDR record with Agent channel data&lt;br /&gt;
${AGENTGOODBYE}		Sound file to use for &amp;quot;Good Bye&amp;quot; when agent logs out&lt;br /&gt;
${AGENTACKCALL} 	Whether the agent should acknowledge the incoming call&lt;br /&gt;
${AGENTAUTOLOGOFF}	Auto logging off for an agent&lt;br /&gt;
${AGENTWRAPUPTIME}	Setting the time for wrapup between incoming calls&lt;br /&gt;
${AGENTNUMBER}		* Agent number (username) set at login&lt;br /&gt;
${AGENTSTATUS}		* Status of login	( fail | on | off )&lt;br /&gt;
${AGENTEXTEN}		* Extension for logged in agent&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Dial() application uses the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${DIALEDPEERNAME} 		* Dialed peer name&lt;br /&gt;
${DIALEDPEERNUMBER} 		* Dialed peer number&lt;br /&gt;
${DIALEDTIME}   		* Time for the call (seconds)&lt;br /&gt;
${ANSWEREDTIME} 		* Time from dial to answer (seconds)&lt;br /&gt;
${DIALSTATUS}   		* Status of the call, one of:&lt;br /&gt;
                		(CHANUNAVAIL | CONGESTION | BUSY | NOANSWER &lt;br /&gt;
					| ANSWER | CANCEL | DONTCALL | TORTURE)&lt;br /&gt;
${DYNAMIC_FEATURES}		* The list of features (from the [applicationmap] section of&lt;br /&gt;
				  features.conf) to activate during the call, with feature&lt;br /&gt;
				  names separated by '#' characters&lt;br /&gt;
${LIMIT_PLAYAUDIO_CALLER}	Soundfile for call limits&lt;br /&gt;
${LIMIT_PLAYAUDIO_CALLEE}	Soundfile for call limits&lt;br /&gt;
${LIMIT_WARNING_FILE}		Soundfile for call limits&lt;br /&gt;
${LIMIT_TIMEOUT_FILE}		Soundfile for call limits&lt;br /&gt;
${LIMIT_CONNECT_FILE}		Soundfile for call limits&lt;br /&gt;
${OUTBOUND_GROUP}		Default groups for peer channels (as in SetGroup)&lt;br /&gt;
* See &amp;quot;show application dial&amp;quot; for more information&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The chanisavail() application sets the following variables:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${AVAILCHAN}		* the name of the available channel if one was found	&lt;br /&gt;
${AVAILORIGCHAN} 	* the canonical channel name that was used to create the channel&lt;br /&gt;
${AVAILSTATUS}		* Status of requested channel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using macros in the dialplan, these variables are available&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${MACRO_EXTEN}		* The calling extensions&lt;br /&gt;
${MACRO_CONTEXT}	* The calling context&lt;br /&gt;
${MACRO_PRIORITY}	* The calling priority&lt;br /&gt;
${MACRO_OFFSET}		Offset to add to priority at return from macro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you compile with OSP support in the SIP channel, these variables are used:&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${OSPHANDLE}		Handle from the OSP Library&lt;br /&gt;
${OSPTECH}		OSP Technology from Library&lt;br /&gt;
${OSPDEST}		OSP Destination from Library&lt;br /&gt;
${OSPTOKEN}		OSP Token to use for call from Library&lt;br /&gt;
${OSPRESULTS}		Number of OSP results&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CDR Variables==&lt;br /&gt;
&lt;br /&gt;
If the channel has a cdr, that cdr record has it's own set of variables which can be accessed just like channel variables. The following builtin variables are available.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${CDR(clid)}			Caller ID&lt;br /&gt;
${CDR(src)}			Source &lt;br /&gt;
${CDR(dst)}			Destination&lt;br /&gt;
${CDR(dcontext)}		Destination context&lt;br /&gt;
${CDR(channel)}			Channel name&lt;br /&gt;
${CDR(dstchannel)}		Destination channel&lt;br /&gt;
${CDR(lastapp)}			Last app executed&lt;br /&gt;
${CDR(lastdata)}		Last app's arguments&lt;br /&gt;
${CDR(start)}			Time the call started.&lt;br /&gt;
${CDR(answer)}			Time the call was answered.&lt;br /&gt;
${CDR(end)}			Time the call ended.&lt;br /&gt;
${CDR(duration)}		Duration of the call.&lt;br /&gt;
${CDR(billsec)}			Duration of the call once it was answered.&lt;br /&gt;
${CDR(disposition)}		ANSWERED, NO ANSWER, BUSY&lt;br /&gt;
${CDR(amaflags)}		DOCUMENTATION, BILL, IGNORE etc&lt;br /&gt;
${CDR(accountcode)}		The channel's account code.&lt;br /&gt;
${CDR(uniqueid)}		The channel's unique id.&lt;br /&gt;
${CDR(userfield)}		The channels uses specified field.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, you can set your own extra variables with a traditional Set(CDR(var)=val) to anything you want.&lt;br /&gt;
&lt;br /&gt;
Certain functional variables may be accessed with ${foo(&amp;lt;args&amp;gt;)}. A list of these functional variables may be found by typing &amp;quot;show functions&amp;quot; at the Asterisk CLI.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Voicemail</id>
		<title>Voicemail</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Voicemail"/>
				<updated>2007-09-04T13:37:48Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Synopsis : Leave a Voicemail message&lt;br /&gt;
&lt;br /&gt;
; Description : VoiceMail(mailbox[@context][&amp;amp;mailbox[@context]][...][|options]): This application allows the calling party to leave a message for the specified list of mailboxes. When multiple mailboxes are specified, the greeting will be taken from the first mailbox specified. Dialplan execution will stop if the specified mailbox does not exist. The Voicemail application will exit if any of the following DTMF digits are received:&lt;br /&gt;
    0 - Jump to the 'o' extension in the current dialplan context.&lt;br /&gt;
    * - Jump to the 'a' extension in the current dialplan context.&lt;br /&gt;
  This application will set the following channel variable upon completion:&lt;br /&gt;
    VMSTATUS - This indicates the status of the execution of the VoiceMail&lt;br /&gt;
               application. The possible values are:&lt;br /&gt;
               SUCCESS | USEREXIT | FAILED&lt;br /&gt;
  Options:&lt;br /&gt;
    b    - Play the 'busy' greeting to the calling party.&lt;br /&gt;
    g(#) - Use the specified amount of gain when recording the voicemail&lt;br /&gt;
           message. The units are whole-number decibels (dB).&lt;br /&gt;
    s    - Skip the playback of instructions for leaving a message to the&lt;br /&gt;
           calling party.&lt;br /&gt;
    u    - Play the 'unavailable' greeting.&lt;br /&gt;
    j    - Jump to priority n+101 if the mailbox is not found or some other&lt;br /&gt;
&lt;br /&gt;
Sample voicemail.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Voicemail Configuration&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; NOTE: Asterisk has to edit this file to change a user's password.  This does&lt;br /&gt;
; not currently work with the &amp;quot;#include &amp;lt;file&amp;gt;&amp;quot; directive for Asterisk&lt;br /&gt;
; configuration files.  Do not use it with this configuration file.&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
[general]&lt;br /&gt;
; Default formats for writing Voicemail&lt;br /&gt;
;format=g723sf|wav49|wav&lt;br /&gt;
format=wav49|gsm|wav&lt;br /&gt;
;&lt;br /&gt;
; WARNING:&lt;br /&gt;
; If you change the list of formats that you record voicemail in&lt;br /&gt;
; when you have mailboxes that contain messages, you _MUST_ absolutely&lt;br /&gt;
; manually go through those mailboxes and convert/delete/add the&lt;br /&gt;
; the message files so that they appear to have been stored using&lt;br /&gt;
; your new format list. If you don't do this, very unpleasant&lt;br /&gt;
; things may happen to your users while they are retrieving and&lt;br /&gt;
; manipulating their voicemail.&lt;br /&gt;
;&lt;br /&gt;
; In other words: don't change the format list on a production system&lt;br /&gt;
; unless you are _VERY_  sure that you know what you are doing and are&lt;br /&gt;
; prepared for the consequences.&lt;br /&gt;
;&lt;br /&gt;
; Who the e-mail notification should appear to come from&lt;br /&gt;
serveremail=asterisk&lt;br /&gt;
;serveremail=asterisk@linux-support.net&lt;br /&gt;
; Should the email contain the voicemail as an attachment&lt;br /&gt;
attach=yes&lt;br /&gt;
; Maximum number of messages per folder.  If not specified, a default value&lt;br /&gt;
; (100) is used.  Maximum value for this option is 9999.&lt;br /&gt;
;maxmsg=100&lt;br /&gt;
; Maximum length of a voicemail message in seconds&lt;br /&gt;
;maxmessage=180&lt;br /&gt;
; Minimum length of a voicemail message in seconds for the message to be kept&lt;br /&gt;
; The default is no minimum.&lt;br /&gt;
;minmessage=3&lt;br /&gt;
; Maximum length of greetings in seconds&lt;br /&gt;
;maxgreet=60&lt;br /&gt;
; How many milliseconds to skip forward/back when rew/ff in message playback&lt;br /&gt;
skipms=3000&lt;br /&gt;
; How many seconds of silence before we end the recording&lt;br /&gt;
maxsilence=10&lt;br /&gt;
; Silence threshold (what we consider silence: the lower, the more sensitive)&lt;br /&gt;
silencethreshold=128&lt;br /&gt;
; Max number of failed login attempts&lt;br /&gt;
maxlogins=3&lt;br /&gt;
; If you need to have an external program, i.e. /usr/bin/myapp called when a&lt;br /&gt;
; voicemail is left, delivered, or your voicemailbox is checked, uncomment&lt;br /&gt;
; this:&lt;br /&gt;
;externnotify=/usr/bin/myapp&lt;br /&gt;
; If you need to have an external program, i.e. /usr/bin/myapp called when a&lt;br /&gt;
; voicemail password is changed, uncomment this:&lt;br /&gt;
;externpass=/usr/bin/myapp&lt;br /&gt;
; For the directory, you can override the intro file if you want&lt;br /&gt;
;directoryintro=dir-intro&lt;br /&gt;
; The character set for voicemail messages can be specified here&lt;br /&gt;
;charset=ISO-8859-1&lt;br /&gt;
; The ADSI feature descriptor number to download to &lt;br /&gt;
;adsifdn=0000000F&lt;br /&gt;
; The ADSI security lock code&lt;br /&gt;
;adsisec=9BDBF7AC&lt;br /&gt;
; The ADSI voicemail application version number.&lt;br /&gt;
;adsiver=1&lt;br /&gt;
; Skip the &amp;quot;[PBX]:&amp;quot; string from the message title&lt;br /&gt;
;pbxskip=yes&lt;br /&gt;
; Change the From: string&lt;br /&gt;
;fromstring=The Asterisk PBX&lt;br /&gt;
; Permit finding entries for forward/compose from the directory&lt;br /&gt;
;usedirectory=yes&lt;br /&gt;
;&lt;br /&gt;
; Change the from, body and/or subject, variables:&lt;br /&gt;
;     VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_CIDNUM,&lt;br /&gt;
;     VM_CIDNAME, VM_DATE&lt;br /&gt;
;&lt;br /&gt;
; Note: The emailbody config row can only be up to 512 characters due to a&lt;br /&gt;
;       limitation in the Asterisk configuration subsystem.&lt;br /&gt;
;emailsubject=[PBX]: New message ${VM_MSGNUM} in mailbox ${VM_MAILBOX}&lt;br /&gt;
; The following definition is very close to the default, but the default shows&lt;br /&gt;
; just the CIDNAME, if it is not null, otherwise just the CIDNUM, or &amp;quot;an unknown&lt;br /&gt;
; caller&amp;quot;, if they are both null.&lt;br /&gt;
;emailbody=Dear ${VM_NAME}:\n\n\tjust wanted to let you know you were just left a ${VM_DUR} long message (number ${VM_MSGNUM})\nin mailbox ${VM_MAILBOX} from ${VM_CALLERID}, on ${VM_DATE}, so you might\nwant to check it when you get a chance.  Thanks!\n\n\t\t\t\t--Asterisk\n&lt;br /&gt;
;&lt;br /&gt;
; You can also change the Pager From: string, the pager body and/or subject.&lt;br /&gt;
; The above defined variables also can be used here&lt;br /&gt;
;pagerfromstring=The Asterisk PBX&lt;br /&gt;
;pagersubject=New VM&lt;br /&gt;
;pagerbody=New ${VM_DUR} long msg in box ${VM_MAILBOX}\nfrom ${VM_CALLERID}, on ${VM_DATE}&lt;br /&gt;
;&lt;br /&gt;
; Set the date format on outgoing mails. Valid arguments can be found on the&lt;br /&gt;
; strftime(3) man page&lt;br /&gt;
;&lt;br /&gt;
; Default&lt;br /&gt;
emaildateformat=%A, %B %d, %Y at %r&lt;br /&gt;
; 24h date format&lt;br /&gt;
;emaildateformat=%A, %d %B %Y at %H:%M:%S&lt;br /&gt;
;&lt;br /&gt;
; You can override the default program to send e-mail if you wish, too&lt;br /&gt;
;&lt;br /&gt;
;mailcmd=/usr/sbin/sendmail -t&lt;br /&gt;
; &lt;br /&gt;
; Users may be located in different timezones, or may have different &lt;br /&gt;
; message announcements for their introductory message when they enter &lt;br /&gt;
; the voicemail system. Set the message and the timezone each user &lt;br /&gt;
; hears here. Set the user into one of these zones with the tz= attribute &lt;br /&gt;
; in the options field of the mailbox. Of course, language substitution &lt;br /&gt;
; still applies here so you may have several directory trees that have &lt;br /&gt;
; alternate language choices. &lt;br /&gt;
; &lt;br /&gt;
; Look in /usr/share/zoneinfo/ for names of timezones. &lt;br /&gt;
; Look at the manual page for strftime for a quick tutorial on how the &lt;br /&gt;
; variable substitution is done on the values below. &lt;br /&gt;
; &lt;br /&gt;
; Supported values: &lt;br /&gt;
; 'filename'    filename of a soundfile (single ticks around the filename&lt;br /&gt;
;               required)&lt;br /&gt;
; ${VAR}        variable substitution &lt;br /&gt;
; A or a        Day of week (Saturday, Sunday, ...) &lt;br /&gt;
; B or b or h   Month name (January, February, ...) &lt;br /&gt;
; d or e        numeric day of month (first, second, ..., thirty-first) &lt;br /&gt;
; Y             Year &lt;br /&gt;
; I or l        Hour, 12 hour clock &lt;br /&gt;
; H             Hour, 24 hour clock (single digit hours preceded by &amp;quot;oh&amp;quot;) &lt;br /&gt;
; k             Hour, 24 hour clock (single digit hours NOT preceded by &amp;quot;oh&amp;quot;) &lt;br /&gt;
; M             Minute, with 00 pronounced as &amp;quot;o'clock&amp;quot; &lt;br /&gt;
; N             Minute, with 00 pronounced as &amp;quot;hundred&amp;quot; (US military time)&lt;br /&gt;
; P or p        AM or PM &lt;br /&gt;
; Q             &amp;quot;today&amp;quot;, &amp;quot;yesterday&amp;quot; or ABdY&lt;br /&gt;
;               (*note: not standard strftime value) &lt;br /&gt;
; q             &amp;quot;&amp;quot; (for today), &amp;quot;yesterday&amp;quot;, weekday, or ABdY&lt;br /&gt;
;               (*note: not standard strftime value) &lt;br /&gt;
; R             24 hour time, including minute &lt;br /&gt;
; &lt;br /&gt;
; &lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Each mailbox is listed in the form &amp;lt;mailbox&amp;gt;=&amp;lt;password&amp;gt;,&amp;lt;name&amp;gt;,&amp;lt;email&amp;gt;,&amp;lt;pager_email&amp;gt;,&amp;lt;options&amp;gt;&lt;br /&gt;
; if the e-mail is specified, a message will be sent when a message is&lt;br /&gt;
; received, to the given mailbox. If pager is specified, a message will be&lt;br /&gt;
; sent there as well. If the password is prefixed by '-', then it is&lt;br /&gt;
; considered to be unchangeable.&lt;br /&gt;
;&lt;br /&gt;
; Advanced options example is extension 4069&lt;br /&gt;
; NOTE: All options can be expressed globally in the general section, and&lt;br /&gt;
; overridden in the per-mailbox settings, unless listed otherwise.&lt;br /&gt;
; &lt;br /&gt;
; tz=central 		; Timezone from zonemessages above.  Irrelevant if envelope=no.&lt;br /&gt;
; attach=yes 		; Attach the voicemail to the notification email *NOT* the pager email&lt;br /&gt;
; saycid=yes 		; Say the caller id information before the message. If not described, &lt;br /&gt;
			;     or set to no, it will be in the envelope&lt;br /&gt;
; cidinternalcontexts=intern	; Internal Context for Name Playback instead of extension digits when saying caller id.&lt;br /&gt;
; sayduration=no 	; Turn on/off the duration information before the message. [ON by default]&lt;br /&gt;
; saydurationm=2        ; Specify the minimum duration to say. Default is 2 minutes&lt;br /&gt;
; dialout=fromvm 	; Context to dial out from [option 4 from the advanced menu]&lt;br /&gt;
			;     if not listed, dialing out will not be permitted&lt;br /&gt;
sendvoicemail=yes	; Context to Send voicemail from [option 5 from the advanced menu]&lt;br /&gt;
  			; if not listed, sending messages from inside voicemail will not be &lt;br /&gt;
			; permitted&lt;br /&gt;
; searchcontexts=yes	; Current default behavior is to search only the default context&lt;br /&gt;
			; if one is not specified.  The older behavior was to search all contexts.&lt;br /&gt;
			; This option restores the old behavior [DEFAULT=no]&lt;br /&gt;
; callback=fromvm 	; Context to call back from  &lt;br /&gt;
			;     if not listed, calling the sender back will not be permitted&lt;br /&gt;
; review=yes 		; Allow sender to review/rerecord their message before saving it [OFF by default&lt;br /&gt;
; operator=yes 		; Allow sender to hit 0 before/after/during  leaving a voicemail to &lt;br /&gt;
			;     reach an operator  [OFF by default]&lt;br /&gt;
; envelope=no 		; Turn on/off envelope playback before message playback. [ON by default] &lt;br /&gt;
			;     This does NOT affect option 3,3 from the advanced options menu&lt;br /&gt;
; delete=yes		; After notification, the voicemail is deleted from the server. [per-mailbox only]&lt;br /&gt;
			;     This is intended for use with users who wish to receive their voicemail ONLY by email.&lt;br /&gt;
			;     Note:  deletevoicemail is provided as an equivalent option for Realtime configuration.&lt;br /&gt;
; nextaftercmd=yes	; Skips to the next message after hitting 7 or 9 to delete/save current message.&lt;br /&gt;
			;     [global option only at this time] &lt;br /&gt;
; forcename=yes		; Forces a new user to record their name.  A new user is&lt;br /&gt;
			;     determined by the password being the same as&lt;br /&gt;
			;     the mailbox number.  The default is &amp;quot;no&amp;quot;.&lt;br /&gt;
; forcegreetings=no	; This is the same as forcename, except for recording&lt;br /&gt;
			;     greetings.  The default is &amp;quot;no&amp;quot;.&lt;br /&gt;
; hidefromdir=yes	; Hide this mailbox from the directory produced by app_directory&lt;br /&gt;
			;     The default is &amp;quot;no&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
[zonemessages]&lt;br /&gt;
eastern=America/New_York|'vm-received' Q 'digits/at' IMp&lt;br /&gt;
central=America/Chicago|'vm-received' Q 'digits/at' IMp&lt;br /&gt;
central24=America/Chicago|'vm-received' q 'digits/at' H N 'hours'&lt;br /&gt;
military=Zulu|'vm-received' q 'digits/at' H N 'hours' 'phonetic/z_p'&lt;br /&gt;
&lt;br /&gt;
[default]&lt;br /&gt;
; Define maximum number of messages per folder for partcular context.&lt;br /&gt;
;maxmsg=50&lt;br /&gt;
&lt;br /&gt;
1234 =&amp;gt; 4242,Example Mailbox,root@localhost&lt;br /&gt;
;4200 =&amp;gt; 9855,Mark Spencer,markster@linux-support.net,mypager@digium.com,attach=no|serveremail=myaddy@digium.com|tz=central|maxmsg=10&lt;br /&gt;
;4300 =&amp;gt; 3456,Ben Rigas,ben@american-computer.net&lt;br /&gt;
;4310 =&amp;gt; -5432,Sales,sales@marko.net&lt;br /&gt;
;4069 =&amp;gt; 6522,Matt Brooks,matt@marko.net,,|tz=central|attach=yes|saycid=yes|dialout=fromvm|callback=fromvm|review=yes|operator=yes|envelope=yes|sayduration=yes|saydurationm=1&lt;br /&gt;
;4073 =&amp;gt; 1099,Bianca Paige,bianca@biancapaige.com,,delete=1&lt;br /&gt;
;4110 =&amp;gt; 3443,Rob Flynn,rflynn@blueridge.net&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Mailboxes may be organized into multiple contexts for&lt;br /&gt;
; voicemail virtualhosting&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
[other]&lt;br /&gt;
;The intro can be customized on a per-context basis&lt;br /&gt;
;directoryintro=dir-company2&lt;br /&gt;
1234 =&amp;gt; 5678,Company2 User,root@localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/SMS</id>
		<title>SMS</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/SMS"/>
				<updated>2007-09-04T13:37:15Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SMS() is an application to handles calls to/from text message capable phones and message centres using ETSI ES 201 912 protocol 1 FSK messaging over analog calls.&lt;br /&gt;
&lt;br /&gt;
Basically it allows sending and receiving of text messages over the PSTN. It is compatible with BT Text service in the UK and works on ISDN and PSTN lines. It is designed to connect to an ISDN or zap interface directly and uses FSK so would probably not work over any sort of compressed link (like a VoIP call using GSM codec).&lt;br /&gt;
&lt;br /&gt;
Typical applications include:-&lt;br /&gt;
&lt;br /&gt;
1. Connection to a message centre to send text messages - probably initiated via the manager interface or &amp;quot;outgoing&amp;quot; directory&lt;br /&gt;
2. Connection to an POTS line with an SMS capable phone to send messages - probably initiated via the manager interface or &amp;quot;outgoing&amp;quot; directory&lt;br /&gt;
3. Acceptance of calls from the message centre (based on CLI) and storage of received messages&lt;br /&gt;
4. Acceptance of calls from a POTS line with an SMS capable phone and storage of received messages&lt;br /&gt;
&lt;br /&gt;
* Arguments to sms():&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
- First argument is queue name&lt;br /&gt;
- Second is options:&lt;br /&gt;
 a: SMS() is to act as the answering side, and so send the initial FSK frame&lt;br /&gt;
 s: SMS() is to act as a service centre side rather than as terminal equipment&lt;br /&gt;
&lt;br /&gt;
- If a third argument is specified, then SMS does not handle the call at all,&lt;br /&gt;
  but takes the third argument as a destination number to send an SMS to&lt;br /&gt;
- The forth argument onward is a message to be queued to the number in the&lt;br /&gt;
  third argument. All this does is create the file in the me-sc directory.&lt;br /&gt;
  If 's' is set then the number is the source&lt;br /&gt;
  address and the message placed in the sc-me directory.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
All text messages are stored in /var/spool/asterisk/sms&lt;br /&gt;
A log is recorded in /var/log/asterisk/sms&lt;br /&gt;
&lt;br /&gt;
There are two subdirectories called sc-me.&amp;lt;queuename&amp;gt; holding all messages from service centre to phone, and me-sc.&amp;lt;queuename&amp;gt; holding all messages from phone to service centre.&lt;br /&gt;
&lt;br /&gt;
In each directory are messages in files, one per file, using any filename not starting with a dot.&lt;br /&gt;
&lt;br /&gt;
When connected as a service centre, SMS(s) will send all messages waiting in the sc-me-&amp;lt;queuename&amp;gt; directory, deleting the files as it goes. Any received in this mode are placed in the me-sc-&amp;lt;queuename&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
When connected as a client, SMS() will send all messages waiting in the me-sc-&amp;lt;queuename&amp;gt; directory, deleting the files as it goes. Any received in this mode are placed in the sc-me-&amp;lt;queuename&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
Message files created by SMS() use a time stamp/reference based filename.&lt;br /&gt;
&lt;br /&gt;
The format of the sms file is lines that have the form of key=value&lt;br /&gt;
Keys are :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
oa	Originating Address&lt;br /&gt;
	Telephone number, national number if just digits&lt;br /&gt;
	Telephone number starting with + then digits for international&lt;br /&gt;
	Ignored on sending messages to service centre (CLI used)&lt;br /&gt;
da	Destination Address&lt;br /&gt;
	Telephone number, national number if just digits&lt;br /&gt;
	Telephone number starting with + then digits for international&lt;br /&gt;
scts	Service Centre Time Stamp&lt;br /&gt;
	In the format YYYY-MM-DD HH:MM:SS&lt;br /&gt;
pid	Protocol Identifier (decimal octet value)&lt;br /&gt;
dcs	Data coding scheme (decimal octet value)&lt;br /&gt;
mr	Message reference (decimal octet value)&lt;br /&gt;
ud	The message (see escaping below)&lt;br /&gt;
srr	0/1 Status Report Request&lt;br /&gt;
rp	0/1 Return Path&lt;br /&gt;
vp	mins validity period&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Omitted fields have default values.&lt;br /&gt;
&lt;br /&gt;
Note that there is special format for ud, ud# instead of ud= which is followed by raw hex (2 characters per octet). This is used in output where characters other than 10,13,32-126,128-255 are included in the data. In this case a comment (line starting ;) is added showing the printable characters&lt;br /&gt;
&lt;br /&gt;
When generating files to send to a service centre, only da and ud need be specified. oa is ignored.&lt;br /&gt;
&lt;br /&gt;
When generating files to send to a phone, only oa and ud need be specified. da is ignored.&lt;br /&gt;
&lt;br /&gt;
When receing a message as a service centre, only the destination address is sent, so the originating address is set to the callerid.&lt;br /&gt;
&lt;br /&gt;
EXAMPLES&lt;br /&gt;
&lt;br /&gt;
The following are examples of use within the UK using BT Text SMS/landline service.&lt;br /&gt;
&lt;br /&gt;
This is a context to use with a manager script.&lt;br /&gt;
&lt;br /&gt;
 [smsdial]&lt;br /&gt;
 ; create and send a text message, expects number+message and&lt;br /&gt;
 ; connect to 17094009&lt;br /&gt;
 exten =&amp;gt; _X.,1,SMS(${CALLERIDNUM},,${EXTEN},${CALLERIDNAME})&lt;br /&gt;
 exten =&amp;gt; _X.,n,SMS(${CALLERIDNUM})&lt;br /&gt;
 exten =&amp;gt; _X.,n,Hangup&lt;br /&gt;
&lt;br /&gt;
The script sends&lt;br /&gt;
&lt;br /&gt;
 action: originate&lt;br /&gt;
 callerid: message &amp;lt;from&amp;gt;&lt;br /&gt;
 exten: to&lt;br /&gt;
 channel: Local/17094009&lt;br /&gt;
 context: smsdial&lt;br /&gt;
 priority: 1&lt;br /&gt;
&lt;br /&gt;
You put the message as the name of the caller ID (messy, I know), the&lt;br /&gt;
originating number and hence queue name as the number of the caller ID and the&lt;br /&gt;
exten as the number to which the sms is to be sent. The context uses SMS to&lt;br /&gt;
create the message in the queue and then SMS to communicate iwth 17094009 to&lt;br /&gt;
actually send the message.&lt;br /&gt;
&lt;br /&gt;
Note that the 9 on the end of 17094009 is the sub address 9 meaning no sub&lt;br /&gt;
address (BT specific). If a different digit is used then that is the sub&lt;br /&gt;
address for the sending message source address (appended to the outgoing CLI&lt;br /&gt;
by BT).&lt;br /&gt;
&lt;br /&gt;
For incoming calls you can use a context like this :-&lt;br /&gt;
&lt;br /&gt;
 [incoming]&lt;br /&gt;
 exten =&amp;gt; _XXXXXX/_8005875290,1,SMS(${EXTEN:3},a)&lt;br /&gt;
 exten =&amp;gt; _XXXXXX/_8005875290,n,System(/usr/lib/asterisk/smsin ${EXTEN:3})&lt;br /&gt;
 exten =&amp;gt; _XXXXXX/_80058752[0-8]0,1,SMS(${EXTEN:3}${CALLERIDNUM:8:1},a)&lt;br /&gt;
 exten =&amp;gt; _XXXXXX/_80058752[0-8]0,n,System(/usr/lib/asterisk/smsin ${EXTEN&amp;gt;:3}${CALLERIDNUM:8:1})&lt;br /&gt;
 exten =&amp;gt; _XXXXXX/_80058752[0-8]0,n,Hangup&lt;br /&gt;
&lt;br /&gt;
In this case the called number we get from BT is 6 digits (XXXXXX) and we are&lt;br /&gt;
using the last 3 digits as the queue name.&lt;br /&gt;
&lt;br /&gt;
Priority 1 causes the SMS to be received and processed for the incoming call.&lt;br /&gt;
It is from 080058752X0. The two versions handle the queue name as 3 digits (no&lt;br /&gt;
sub address) or 4 digits (with sub address). In both cases, after the call a&lt;br /&gt;
script (smsin) is run - this is optional, but is useful to actually processed&lt;br /&gt;
the received queued SMS. In our case we email them based on the target number.&lt;br /&gt;
Priority 3 hangs up.&lt;br /&gt;
&lt;br /&gt;
If using the CAPI drivers they send the right CLI and so the _800... would be&lt;br /&gt;
_0800...&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/SIP</id>
		<title>SIP</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/SIP"/>
				<updated>2007-09-04T13:36:41Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Example sip.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; SIP Configuration example for Asterisk&lt;br /&gt;
;&lt;br /&gt;
; Syntax for specifying a SIP device in extensions.conf is&lt;br /&gt;
; SIP/devicename where devicename is defined in a section below.&lt;br /&gt;
;&lt;br /&gt;
; You may also use &lt;br /&gt;
; SIP/username@domain to call any SIP user on the Internet&lt;br /&gt;
; (Don't forget to enable DNS SRV records if you want to use this)&lt;br /&gt;
; &lt;br /&gt;
; If you define a SIP proxy as a peer below, you may call&lt;br /&gt;
; SIP/proxyhostname/user or SIP/user@proxyhostname &lt;br /&gt;
; where the proxyhostname is defined in a section below &lt;br /&gt;
; &lt;br /&gt;
; Useful CLI commands to check peers/users:&lt;br /&gt;
;   sip show peers		Show all SIP peers (including friends)&lt;br /&gt;
;   sip show users		Show all SIP users (including friends)&lt;br /&gt;
;   sip show registry		Show status of hosts we register with&lt;br /&gt;
;&lt;br /&gt;
;   sip debug			Show all SIP messages&lt;br /&gt;
;&lt;br /&gt;
;   reload chan_sip.so		Reload configuration file&lt;br /&gt;
;				Active SIP peers will not be reconfigured&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
[general]&lt;br /&gt;
context=default			; Default context for incoming calls&lt;br /&gt;
;allowguest=no			; Allow or reject guest calls (default is yes, this can also be set to 'osp'&lt;br /&gt;
				; if asterisk was compiled with OSP support.&lt;br /&gt;
;realm=mydomain.tld		; Realm for digest authentication&lt;br /&gt;
				; defaults to &amp;quot;asterisk&amp;quot;&lt;br /&gt;
				; Realms MUST be globally unique according to RFC 3261&lt;br /&gt;
				; Set this to your host name or domain name&lt;br /&gt;
bindport=5060			; UDP Port to bind to (SIP standard port is 5060)&lt;br /&gt;
				; bindport is the local UDP port that Asterisk will listen on&lt;br /&gt;
bindaddr=0.0.0.0		; IP address to bind to (0.0.0.0 binds to all)&lt;br /&gt;
srvlookup=yes			; Enable DNS SRV lookups on outbound calls&lt;br /&gt;
				; Note: Asterisk only uses the first host &lt;br /&gt;
				; in SRV records&lt;br /&gt;
				; Disabling DNS SRV lookups disables the &lt;br /&gt;
				; ability to place SIP calls based on domain &lt;br /&gt;
				; names to some other SIP users on the Internet&lt;br /&gt;
				&lt;br /&gt;
;domain=mydomain.tld		; Set default domain for this host&lt;br /&gt;
				; If configured, Asterisk will only allow&lt;br /&gt;
				; INVITE and REFER to non-local domains&lt;br /&gt;
				; Use &amp;quot;sip show domains&amp;quot; to list local domains&lt;br /&gt;
;domain=mydomain.tld,mydomain-incoming&lt;br /&gt;
				; Add domain and configure incoming context&lt;br /&gt;
				; for external calls to this domain&lt;br /&gt;
;domain=1.2.3.4			; Add IP address as local domain&lt;br /&gt;
				; You can have several &amp;quot;domain&amp;quot; settings&lt;br /&gt;
;allowexternalinvites=no	; Disable INVITE and REFER to non-local domains&lt;br /&gt;
				; Default is yes&lt;br /&gt;
;autodomain=yes			; Turn this on to have Asterisk add local host&lt;br /&gt;
				; name and local IP to domain list.&lt;br /&gt;
;pedantic=yes			; Enable slow, pedantic checking for Pingtel&lt;br /&gt;
				; and multiline formatted headers for strict&lt;br /&gt;
				; SIP compatibility (defaults to &amp;quot;no&amp;quot;)&lt;br /&gt;
;tos=184			; Set IP QoS to either a keyword or numeric val&lt;br /&gt;
;tos=lowdelay			; lowdelay,throughput,reliability,mincost,none&lt;br /&gt;
;maxexpiry=3600			; Max length of incoming registration we allow&lt;br /&gt;
;defaultexpiry=120		; Default length of incoming/outgoing registration&lt;br /&gt;
;notifymimetype=text/plain	; Allow overriding of mime type in MWI NOTIFY&lt;br /&gt;
;checkmwi=10			; Default time between mailbox checks for peers&lt;br /&gt;
;vmexten=voicemail      ; dialplan extension to reach mailbox sets the &lt;br /&gt;
						; Message-Account in the MWI notify message &lt;br /&gt;
						; defaults to &amp;quot;asterisk&amp;quot;&lt;br /&gt;
;videosupport=yes		; Turn on support for SIP video&lt;br /&gt;
;recordhistory=yes		; Record SIP history by default &lt;br /&gt;
				; (see sip history / sip no history)&lt;br /&gt;
&lt;br /&gt;
;disallow=all			; First disallow all codecs&lt;br /&gt;
;allow=ulaw			; Allow codecs in order of preference&lt;br /&gt;
;allow=ilbc			; &lt;br /&gt;
;musicclass=default		; Sets the default music on hold class for all SIP calls&lt;br /&gt;
				; This may also be set for individual users/peers&lt;br /&gt;
;language=en			; Default language setting for all users/peers&lt;br /&gt;
				; This may also be set for individual users/peers&lt;br /&gt;
;relaxdtmf=yes			; Relax dtmf handling&lt;br /&gt;
;rtptimeout=60			; Terminate call if 60 seconds of no RTP activity&lt;br /&gt;
				; when we're not on hold&lt;br /&gt;
;rtpholdtimeout=300		; Terminate call if 300 seconds of no RTP activity&lt;br /&gt;
				; when we're on hold (must be &amp;gt; rtptimeout)&lt;br /&gt;
;trustrpid = no			; If Remote-Party-ID should be trusted&lt;br /&gt;
;sendrpid = yes			; If Remote-Party-ID should be sent&lt;br /&gt;
;progressinband=never		; If we should generate in-band ringing always&lt;br /&gt;
				; use 'never' to never use in-band signalling, even in cases&lt;br /&gt;
				; where some buggy devices might not render it&lt;br /&gt;
				; Valid values: yes, no, never Default: never&lt;br /&gt;
;useragent=Asterisk PBX		; Allows you to change the user agent string&lt;br /&gt;
;promiscredir = no      	; If yes, allows 302 or REDIR to non-local SIP address&lt;br /&gt;
	                       	; Note that promiscredir when redirects are made to the&lt;br /&gt;
       	                	; local system will cause loops since SIP is incapable&lt;br /&gt;
       	                	; of performing a &amp;quot;hairpin&amp;quot; call.&lt;br /&gt;
;usereqphone = no		; If yes, &amp;quot;;user=phone&amp;quot; is added to uri that contains&lt;br /&gt;
				; a valid phone number&lt;br /&gt;
;dtmfmode = rfc2833		; Set default dtmfmode for sending DTMF. Default: rfc2833&lt;br /&gt;
				; Other options: &lt;br /&gt;
				; info : SIP INFO messages&lt;br /&gt;
				; inband : Inband audio (requires 64 kbit codec -alaw, ulaw)&lt;br /&gt;
				; auto : Use rfc2833 if offered, inband otherwise&lt;br /&gt;
&lt;br /&gt;
;compactheaders = yes		; send compact sip headers.&lt;br /&gt;
;sipdebug = yes			; Turn on SIP debugging by default, from&lt;br /&gt;
				; the moment the channel loads this configuration&lt;br /&gt;
;subscribecontext = default	; Set a specific context for SUBSCRIBE requests&lt;br /&gt;
				; Useful to limit subscriptions to local extensions&lt;br /&gt;
				; Settable per peer/user also&lt;br /&gt;
;notifyringing = yes		; Notify subscriptions on RINGING state&lt;br /&gt;
;alwaysauthreject = yes		; When an incoming INVITE or REGISTER is to be rejected,&lt;br /&gt;
		    		; for any reason, always reject with '401 Unauthorized'&lt;br /&gt;
				; instead of letting the requester know whether there was&lt;br /&gt;
				; a matching user or peer for their request&lt;br /&gt;
;&lt;br /&gt;
; If regcontext is specified, Asterisk will dynamically create and destroy a&lt;br /&gt;
; NoOp priority 1 extension for a given peer who registers or unregisters with&lt;br /&gt;
; us.  The actual extension is the 'regexten' parameter of the registering&lt;br /&gt;
; peer or its name if 'regexten' is not provided.  More than one regexten may&lt;br /&gt;
; be supplied if they are separated by '&amp;amp;'.  Patterns may be used in regexten.&lt;br /&gt;
;&lt;br /&gt;
;regcontext=sipregistrations&lt;br /&gt;
;&lt;br /&gt;
; Asterisk can register as a SIP user agent to a SIP proxy (provider)&lt;br /&gt;
; Format for the register statement is:&lt;br /&gt;
;       register =&amp;gt; user[:secret[:authuser]]@host[:port][/extension]&lt;br /&gt;
;&lt;br /&gt;
; If no extension is given, the 's' extension is used. The extension needs to&lt;br /&gt;
; be defined in extensions.conf to be able to accept calls from this SIP proxy&lt;br /&gt;
; (provider).&lt;br /&gt;
;&lt;br /&gt;
; host is either a host name defined in DNS or the name of a section defined&lt;br /&gt;
; below.&lt;br /&gt;
;&lt;br /&gt;
; Examples:&lt;br /&gt;
;&lt;br /&gt;
;register =&amp;gt; 1234:password@mysipprovider.com	&lt;br /&gt;
;&lt;br /&gt;
;     This will pass incoming calls to the 's' extension&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
;register =&amp;gt; 2345:password@sip_proxy/1234&lt;br /&gt;
;&lt;br /&gt;
;    Register 2345 at sip provider 'sip_proxy'.  Calls from this provider&lt;br /&gt;
;    connect to local extension 1234 in extensions.conf, default context,&lt;br /&gt;
;    unless you configure a [sip_proxy] section below, and configure a&lt;br /&gt;
;    context.&lt;br /&gt;
;    Tip 1: Avoid assigning hostname to a sip.conf section like [provider.com]&lt;br /&gt;
;    Tip 2: Use separate type=peer and type=user sections for SIP providers&lt;br /&gt;
;           (instead of type=friend) if you have calls in both directions&lt;br /&gt;
  &lt;br /&gt;
;registertimeout=20		; retry registration calls every 20 seconds (default)&lt;br /&gt;
;registerattempts=10		; Number of registration attempts before we give up&lt;br /&gt;
				; 0 = continue forever, hammering the other server until it &lt;br /&gt;
				; accepts the registration&lt;br /&gt;
				; Default is 0 tries, continue forever&lt;br /&gt;
;callevents=no			; generate manager events when sip ua performs events (e.g. hold)&lt;br /&gt;
&lt;br /&gt;
;----------------------------------------- NAT SUPPORT ------------------------&lt;br /&gt;
; The externip, externhost and localnet settings are used if you use Asterisk&lt;br /&gt;
; behind a NAT device to communicate with services on the outside.&lt;br /&gt;
&lt;br /&gt;
;externip = 200.201.202.203	; Address that we're going to put in outbound SIP messages&lt;br /&gt;
				; if we're behind a NAT&lt;br /&gt;
&lt;br /&gt;
				; The externip and localnet is used&lt;br /&gt;
				; when registering and communicating with other proxies&lt;br /&gt;
				; that we're registered with&lt;br /&gt;
;externhost=foo.dyndns.net	; Alternatively you can specify an &lt;br /&gt;
				; external host, and Asterisk will &lt;br /&gt;
				; perform DNS queries periodically.  Not&lt;br /&gt;
				; recommended for production &lt;br /&gt;
				; environments!  Use externip instead&lt;br /&gt;
;externrefresh=10		; How often to refresh externhost if &lt;br /&gt;
				; used&lt;br /&gt;
				; You may add multiple local networks.  A reasonable set of defaults&lt;br /&gt;
				; are:&lt;br /&gt;
;localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks&lt;br /&gt;
;localnet=10.0.0.0/255.0.0.0	; Also RFC1918&lt;br /&gt;
;localnet=172.16.0.0/12		; Another RFC1918 with CIDR notation&lt;br /&gt;
;localnet=169.254.0.0/255.255.0.0 ;Zero conf local network&lt;br /&gt;
&lt;br /&gt;
; The nat= setting is used when Asterisk is on a public IP, communicating with&lt;br /&gt;
; devices hidden behind a NAT device (broadband router).  If you have one-way&lt;br /&gt;
; audio problems, you usually have problems with your NAT configuration or your&lt;br /&gt;
; firewall's support of SIP+RTP ports.  You configure Asterisk choice of RTP&lt;br /&gt;
; ports for incoming audio in rtp.conf&lt;br /&gt;
;&lt;br /&gt;
;nat=no				; Global NAT settings  (Affects all peers and users)&lt;br /&gt;
                                ; yes = Always ignore info and assume NAT&lt;br /&gt;
                                ; no = Use NAT mode only according to RFC3581 (;rport)&lt;br /&gt;
                                ; never = Never attempt NAT mode or RFC3581 support&lt;br /&gt;
				; route = Assume NAT, don't send rport &lt;br /&gt;
				; (work around more UNIDEN bugs)&lt;br /&gt;
&lt;br /&gt;
;rtcachefriends=yes		; Cache realtime friends by adding them to the internal list&lt;br /&gt;
				; just like friends added from the config file only on a&lt;br /&gt;
				; as-needed basis? (yes|no)&lt;br /&gt;
&lt;br /&gt;
;rtupdate=yes			; Send registry updates to database using realtime? (yes|no)&lt;br /&gt;
				; If set to yes, when a SIP UA registers successfully, the ip address,&lt;br /&gt;
				; the origination port, the registration period, and the username of&lt;br /&gt;
				; the UA will be set to database via realtime. If not present, defaults to 'yes'.&lt;br /&gt;
&lt;br /&gt;
;rtautoclear=yes		; Auto-Expire friends created on the fly on the same schedule&lt;br /&gt;
				; as if it had just registered? (yes|no|&amp;lt;seconds&amp;gt;)&lt;br /&gt;
				; If set to yes, when the registration expires, the friend will vanish from&lt;br /&gt;
				; the configuration until requested again. If set to an integer,&lt;br /&gt;
				; friends expire within this number of seconds instead of the&lt;br /&gt;
				; registration interval.&lt;br /&gt;
&lt;br /&gt;
;ignoreregexpire=yes		; Enabling this setting has two functions:&lt;br /&gt;
				;&lt;br /&gt;
				; For non-realtime peers, when their registration expires, the information&lt;br /&gt;
				; will _not_ be removed from memory or the Asterisk database; if you attempt&lt;br /&gt;
				; to place a call to the peer, the existing information will be used in spite&lt;br /&gt;
				; of it having expired&lt;br /&gt;
				;&lt;br /&gt;
				; For realtime peers, when the peer is retrieved from realtime storage,&lt;br /&gt;
				; the registration information will be used regardless of whether&lt;br /&gt;
				; it has expired or not; if it expires while the realtime peer is still in&lt;br /&gt;
				; memory (due to caching or other reasons), the information will not be&lt;br /&gt;
				; removed from realtime storage&lt;br /&gt;
&lt;br /&gt;
; Incoming INVITE and REFER messages can be matched against a list of 'allowed'&lt;br /&gt;
; domains, each of which can direct the call to a specific context if desired.&lt;br /&gt;
; By default, all domains are accepted and sent to the default context or the&lt;br /&gt;
; context associated with the user/peer placing the call.&lt;br /&gt;
; Domains can be specified using:&lt;br /&gt;
; domain=&amp;lt;domain&amp;gt;[,&amp;lt;context&amp;gt;]&lt;br /&gt;
; Examples:&lt;br /&gt;
; domain=myasterisk.dom&lt;br /&gt;
; domain=customer.com,customer-context&lt;br /&gt;
;&lt;br /&gt;
; In addition, all the 'default' domains associated with a server should be&lt;br /&gt;
; added if incoming request filtering is desired.&lt;br /&gt;
; autodomain=yes&lt;br /&gt;
;&lt;br /&gt;
; To disallow requests for domains not serviced by this server:&lt;br /&gt;
; allowexternaldomains=no&lt;br /&gt;
&lt;br /&gt;
; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to&lt;br /&gt;
                          ; non-peers, use your primary domain &amp;quot;identity&amp;quot;&lt;br /&gt;
                          ; for From: headers instead of just your IP&lt;br /&gt;
                          ; address. This is to be polite and&lt;br /&gt;
                          ; it may be a mandatory requirement for some&lt;br /&gt;
                          ; destinations which do not have a prior&lt;br /&gt;
                          ; account relationship with your server. &lt;br /&gt;
&lt;br /&gt;
[authentication]&lt;br /&gt;
; Global credentials for outbound calls, i.e. when a proxy challenges your&lt;br /&gt;
; Asterisk server for authentication. These credentials override&lt;br /&gt;
; any credentials in peer/register definition if realm is matched.&lt;br /&gt;
;&lt;br /&gt;
; This way, Asterisk can authenticate for outbound calls to other&lt;br /&gt;
; realms. We match realm on the proxy challenge and pick an set of &lt;br /&gt;
; credentials from this list&lt;br /&gt;
; Syntax:&lt;br /&gt;
;	auth = &amp;lt;user&amp;gt;:&amp;lt;secret&amp;gt;@&amp;lt;realm&amp;gt;&lt;br /&gt;
;	auth = &amp;lt;user&amp;gt;#&amp;lt;md5secret&amp;gt;@&amp;lt;realm&amp;gt;&lt;br /&gt;
; Example:&lt;br /&gt;
;auth=mark:topsecret@digium.com&lt;br /&gt;
; &lt;br /&gt;
; You may also add auth= statements to [peer] definitions &lt;br /&gt;
; Peer auth= override all other authentication settings if we match on realm&lt;br /&gt;
&lt;br /&gt;
;------------------------------------------------------------------------------&lt;br /&gt;
; Users and peers have different settings available. Friends have all settings,&lt;br /&gt;
; since a friend is both a peer and a user&lt;br /&gt;
;&lt;br /&gt;
; User config options:        Peer configuration:&lt;br /&gt;
; --------------------        -------------------&lt;br /&gt;
; context                     context&lt;br /&gt;
; permit                      permit&lt;br /&gt;
; deny                        deny&lt;br /&gt;
; secret                      secret&lt;br /&gt;
; md5secret                   md5secret&lt;br /&gt;
; dtmfmode                    dtmfmode&lt;br /&gt;
; canreinvite                 canreinvite&lt;br /&gt;
; nat                         nat&lt;br /&gt;
; callgroup                   callgroup&lt;br /&gt;
; pickupgroup                 pickupgroup&lt;br /&gt;
; language                    language&lt;br /&gt;
; allow                       allow&lt;br /&gt;
; disallow                    disallow&lt;br /&gt;
; insecure                    insecure&lt;br /&gt;
; trustrpid                   trustrpid&lt;br /&gt;
; progressinband              progressinband&lt;br /&gt;
; promiscredir                promiscredir&lt;br /&gt;
; useclientcode               useclientcode&lt;br /&gt;
; accountcode                 accountcode&lt;br /&gt;
; setvar                      setvar&lt;br /&gt;
; callerid		      callerid&lt;br /&gt;
; amaflags		      amaflags&lt;br /&gt;
; call-limit		      call-limit&lt;br /&gt;
; restrictcid		      restrictcid&lt;br /&gt;
; subscribecontext	      subscribecontext&lt;br /&gt;
;                             mailbox&lt;br /&gt;
;                             username&lt;br /&gt;
;                             template&lt;br /&gt;
;                             fromdomain&lt;br /&gt;
;                             regexten&lt;br /&gt;
;                             fromuser&lt;br /&gt;
;                             host&lt;br /&gt;
;                             port&lt;br /&gt;
;                             qualify&lt;br /&gt;
;                             defaultip&lt;br /&gt;
;                             rtptimeout&lt;br /&gt;
;                             rtpholdtimeout&lt;br /&gt;
;                             sendrpid&lt;br /&gt;
;                             outboundproxy&lt;br /&gt;
&lt;br /&gt;
;[sip_proxy]&lt;br /&gt;
; For incoming calls only. Example: FWD (Free World Dialup)&lt;br /&gt;
; We match on IP address of the proxy for incoming calls &lt;br /&gt;
; since we can not match on username (caller id)&lt;br /&gt;
;type=peer&lt;br /&gt;
;context=from-fwd&lt;br /&gt;
;host=fwd.pulver.com&lt;br /&gt;
&lt;br /&gt;
;[sip_proxy-out]&lt;br /&gt;
;type=peer          			; we only want to call out, not be called&lt;br /&gt;
;secret=guessit&lt;br /&gt;
;username=yourusername			; Authentication user for outbound proxies&lt;br /&gt;
;fromuser=yourusername			; Many SIP providers require this!&lt;br /&gt;
;fromdomain=provider.sip.domain	&lt;br /&gt;
;host=box.provider.com&lt;br /&gt;
;usereqphone=yes			; This provider requires &amp;quot;;user=phone&amp;quot; on URI&lt;br /&gt;
;call-limit=5				; permit only 5 simultaneous outgoing calls to this peer&lt;br /&gt;
;outboundproxy=proxy.provider.domain	; send outbound signaling to this proxy, not directly to the peer&lt;br /&gt;
;port=80				; The port number we want to connect to on the remote side&lt;br /&gt;
&lt;br /&gt;
;------------------------------------------------------------------------------&lt;br /&gt;
; Definitions of locally connected SIP phones&lt;br /&gt;
;&lt;br /&gt;
; type = user	a device that authenticates to us by &amp;quot;from&amp;quot; field to place calls&lt;br /&gt;
; type = peer	a device we place calls to or that calls us and we match by host&lt;br /&gt;
; type = friend two configurations (peer+user) in one&lt;br /&gt;
;&lt;br /&gt;
; For local phones, type=friend works most of the time&lt;br /&gt;
;&lt;br /&gt;
; If you have one-way audio, you probably have NAT problems. &lt;br /&gt;
; If Asterisk is on a public IP, and the phone is inside of a NAT device&lt;br /&gt;
; you will need to configure nat option for those phones.&lt;br /&gt;
; Also, turn on qualify=yes to keep the nat session open&lt;br /&gt;
&lt;br /&gt;
;[grandstream1]&lt;br /&gt;
;type=friend 			&lt;br /&gt;
;context=from-sip		; Where to start in the dialplan when this phone calls&lt;br /&gt;
;callerid=John Doe &amp;lt;1234&amp;gt;	; Full caller ID, to override the phones config&lt;br /&gt;
;host=192.168.0.23		; we have a static but private IP address&lt;br /&gt;
				; No registration allowed&lt;br /&gt;
;nat=no				; there is not NAT between phone and Asterisk&lt;br /&gt;
;canreinvite=yes		; allow RTP voice traffic to bypass Asterisk&lt;br /&gt;
;dtmfmode=info			; either RFC2833 or INFO for the BudgeTone&lt;br /&gt;
;call-limit=1			; permit only 1 outgoing call and 1 incoming call at a time&lt;br /&gt;
				; from the phone to asterisk&lt;br /&gt;
				; (1 for the explicit peer, 1 for the explicit user,&lt;br /&gt;
				; remember that a friend equals 1 peer and 1 user in&lt;br /&gt;
				; memory)&lt;br /&gt;
;mailbox=1234@default		; mailbox 1234 in voicemail context &amp;quot;default&amp;quot;&lt;br /&gt;
;disallow=all			; need to disallow=all before we can use allow=&lt;br /&gt;
;allow=ulaw			; Note: In user sections the order of codecs&lt;br /&gt;
				; listed with allow= does NOT matter!&lt;br /&gt;
;allow=alaw&lt;br /&gt;
;allow=g723.1			; Asterisk only supports g723.1 pass-thru!&lt;br /&gt;
;allow=g729			; Pass-thru only unless g729 license obtained&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;[xlite1]&lt;br /&gt;
; Turn off silence suppression in X-Lite (&amp;quot;Transmit Silence&amp;quot;=YES)!&lt;br /&gt;
; Note that Xlite sends NAT keep-alive packets, so qualify=yes is not needed&lt;br /&gt;
;type=friend&lt;br /&gt;
;regexten=1234			; When they register, create extension 1234&lt;br /&gt;
;callerid=&amp;quot;Jane Smith&amp;quot; &amp;lt;5678&amp;gt;&lt;br /&gt;
;host=dynamic			; This device needs to register&lt;br /&gt;
;nat=yes			; X-Lite is behind a NAT router&lt;br /&gt;
;canreinvite=no			; Typically set to NO if behind NAT&lt;br /&gt;
;disallow=all&lt;br /&gt;
;allow=gsm			; GSM consumes far less bandwidth than ulaw&lt;br /&gt;
;allow=ulaw&lt;br /&gt;
;allow=alaw&lt;br /&gt;
;mailbox=1234@default,1233@default	; Subscribe to status of multiple mailboxes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;[snom]&lt;br /&gt;
;type=friend			; Friends place calls and receive calls&lt;br /&gt;
;context=from-sip		; Context for incoming calls from this user&lt;br /&gt;
;secret=blah&lt;br /&gt;
;subscribecontext=localextensions	; Only allow SUBSCRIBE for local extensions&lt;br /&gt;
;language=de			; Use German prompts for this user &lt;br /&gt;
;host=dynamic			; This peer register with us&lt;br /&gt;
;dtmfmode=inband		; Choices are inband, rfc2833, or info&lt;br /&gt;
;defaultip=192.168.0.59		; IP used until peer registers&lt;br /&gt;
;mailbox=1234@context,2345      ; Mailbox(-es) for message waiting indicator&lt;br /&gt;
;vmexten=voicemail      ; dialplan extension to reach mailbox &lt;br /&gt;
                        ; sets the Message-Account in the MWI notify message&lt;br /&gt;
                        ; defaults to global vmexten which defaults to &amp;quot;asterisk&amp;quot;&lt;br /&gt;
;restrictcid=yes		; To have the callerid restriced -&amp;gt; sent as ANI&lt;br /&gt;
;disallow=all&lt;br /&gt;
;allow=ulaw			; dtmfmode=inband only works with ulaw or alaw!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;[polycom]&lt;br /&gt;
;type=friend			; Friends place calls and receive calls&lt;br /&gt;
;context=from-sip		; Context for incoming calls from this user&lt;br /&gt;
;secret=blahpoly&lt;br /&gt;
;host=dynamic			; This peer register with us&lt;br /&gt;
;dtmfmode=rfc2833		; Choices are inband, rfc2833, or info&lt;br /&gt;
;username=polly			; Username to use in INVITE until peer registers&lt;br /&gt;
				; Normally you do NOT need to set this parameter&lt;br /&gt;
;disallow=all&lt;br /&gt;
;allow=ulaw                     ; dtmfmode=inband only works with ulaw or alaw!&lt;br /&gt;
;progressinband=no		; Polycom phones don't work properly with &amp;quot;never&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;[pingtel]&lt;br /&gt;
;type=friend&lt;br /&gt;
;secret=blah&lt;br /&gt;
;host=dynamic&lt;br /&gt;
;insecure=port			; Allow matching of peer by IP address without matching port number&lt;br /&gt;
;insecure=invite		; Do not require authentication of incoming INVITEs&lt;br /&gt;
;insecure=port,invite		; (both)&lt;br /&gt;
;qualify=1000			; Consider it down if it's 1 second to reply&lt;br /&gt;
				; Helps with NAT session&lt;br /&gt;
				; qualify=yes uses default value&lt;br /&gt;
;&lt;br /&gt;
; Call group and Pickup group should be in the range from 0 to 63&lt;br /&gt;
;&lt;br /&gt;
;callgroup=1,3-4		; We are in caller groups 1,3,4&lt;br /&gt;
;pickupgroup=1,3-5		; We can do call pick-p for call group 1,3,4,5&lt;br /&gt;
;defaultip=192.168.0.60		; IP address to use if peer has not registered&lt;br /&gt;
&lt;br /&gt;
;[cisco1]&lt;br /&gt;
;type=friend&lt;br /&gt;
;secret=blah&lt;br /&gt;
;qualify=200			; Qualify peer is no more than 200ms away&lt;br /&gt;
;nat=yes			; This phone may be natted&lt;br /&gt;
				; Send SIP and RTP to the IP address that packet is &lt;br /&gt;
				; received from instead of trusting SIP headers &lt;br /&gt;
;host=dynamic			; This device registers with us&lt;br /&gt;
;canreinvite=no			; Asterisk by default tries to redirect the&lt;br /&gt;
				; RTP media stream (audio) to go directly from&lt;br /&gt;
				; the caller to the callee.  Some devices do not&lt;br /&gt;
				; support this (especially if one of them is &lt;br /&gt;
				; behind a NAT).&lt;br /&gt;
;defaultip=192.168.0.4		; IP address to use until registration&lt;br /&gt;
;username=goran			; Username to use when calling this device before registration&lt;br /&gt;
				; Normally you do NOT need to set this parameter&lt;br /&gt;
;setvar=CUSTID=5678		; Channel variable to be set for all calls from this device&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Queue</id>
		<title>Queue</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Queue"/>
				<updated>2007-09-04T13:36:11Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In order to properly manage ACD queues, it is important to be able to keep track of details of call setups and teardowns in much greater detail than traditional call detail records provide. In order to support this, extensive and detailed tracing of every queued call is stored in the queue log, located (by default) in /var/log/asterisk/queue_log.&lt;br /&gt;
&lt;br /&gt;
These are the events (and associated information) in the queue log:&lt;br /&gt;
&lt;br /&gt;
;ABANDON(position|origposition|waittime)&lt;br /&gt;
The caller abandoned their position in the queue. The position is the caller's position in the queue when they hungup, the origposition is the original position the caller was when they first entered the&lt;br /&gt;
queue, and the waittime is how long the call had been waiting in the queue at the time of disconnect.&lt;br /&gt;
&lt;br /&gt;
;AGENTDUMP&lt;br /&gt;
The agent dumped the caller while listening to the queue announcement.&lt;br /&gt;
&lt;br /&gt;
;AGENTLOGIN(channel)&lt;br /&gt;
The agent logged in.  The channel is recorded.&lt;br /&gt;
&lt;br /&gt;
;AGENTCALLBACKLOGIN(exten@context)&lt;br /&gt;
The callback agent logged in.  The login extension and context is recorded.&lt;br /&gt;
&lt;br /&gt;
;AGENTLOGOFF(channel|logintime)&lt;br /&gt;
The agent logged off.  The channel is recorded, along with the total time&lt;br /&gt;
the agent was logged in.&lt;br /&gt;
&lt;br /&gt;
;AGENTCALLBACKLOGOFF(exten@context|logintime|reason)&lt;br /&gt;
The callback agent logged off.  The last login extension and context is recorded, along with the total time the agent was logged in, and the reason for the logoff if it was not a normal logoff (e.g., Autologoff)&lt;br /&gt;
&lt;br /&gt;
;COMPLETEAGENT(holdtime|calltime|origposition)&lt;br /&gt;
The caller was connected to an agent, and the call was terminated normally by the *agent*.  The caller's hold time and the length of the call are both recorded.  The caller's original position in the queue is recorded in origposition.&lt;br /&gt;
&lt;br /&gt;
;COMPLETECALLER(holdtime|calltime|origposition)&lt;br /&gt;
The caller was connected to an agent, and the call was terminated normally by the *caller*.  The caller's hold time and the length of the call are both recorded.  The caller's original position in the queue is recorded in origposition.&lt;br /&gt;
&lt;br /&gt;
;CONFIGRELOAD&lt;br /&gt;
The configuration has been reloaded (e.g. with asterisk -rx reload)&lt;br /&gt;
&lt;br /&gt;
;CONNECT(holdtime)&lt;br /&gt;
The caller was connected to an agent.  Hold time represents the amount&lt;br /&gt;
of time the caller was on hold.&lt;br /&gt;
&lt;br /&gt;
;ENTERQUEUE(url|callerid)&lt;br /&gt;
A call has entered the queue.  URL (if specified) and Caller*ID are placed&lt;br /&gt;
in the log.&lt;br /&gt;
&lt;br /&gt;
;EXITWITHKEY(key|position)&lt;br /&gt;
The caller elected to use a menu key to exit the queue.  The key and the caller's position in the queue are recorded.&lt;br /&gt;
&lt;br /&gt;
;EXITWITHTIMEOUT(position)&lt;br /&gt;
The caller was on hold too long and the timeout expired.&lt;br /&gt;
&lt;br /&gt;
;QUEUESTART&lt;br /&gt;
The queueing system has been started for the first time this session.&lt;br /&gt;
&lt;br /&gt;
;SYSCOMPAT&lt;br /&gt;
A call was answered by an agent, but the call was dropped because the &lt;br /&gt;
channels were not compatible.&lt;br /&gt;
&lt;br /&gt;
;TRANSFER(extension,context)&lt;br /&gt;
Caller was transferred to a different extension.  Context and extension&lt;br /&gt;
are recorded.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/ODBC</id>
		<title>ODBC</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/ODBC"/>
				<updated>2007-09-04T13:35:43Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ODBC Storage allows you to store voicemail messages within a database &lt;br /&gt;
instead of using a file.  This is '''not''' a full realtime engine and &lt;br /&gt;
'''only''' supports ODBC.  The table description for the &amp;quot;voicemessages&amp;quot; &lt;br /&gt;
table is as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+----------------+-------------+------+-----+---------+-------+&lt;br /&gt;
| Field          | Type        | Null | Key | Default | Extra |&lt;br /&gt;
+----------------+-------------+------+-----+---------+-------+&lt;br /&gt;
| msgnum         | int(11)     | YES  |     | NULL    |       |&lt;br /&gt;
| dir            | varchar(80) | YES  | MUL | NULL    |       |&lt;br /&gt;
| context        | varchar(80) | YES  |     | NULL    |       |&lt;br /&gt;
| macrocontext   | varchar(80) | YES  |     | NULL    |       |&lt;br /&gt;
| callerid       | varchar(40) | YES  |     | NULL    |       |&lt;br /&gt;
| origtime       | varchar(40) | YES  |     | NULL    |       |&lt;br /&gt;
| duration       | varchar(20) | YES  |     | NULL    |       |&lt;br /&gt;
| mailboxuser    | varchar(80) | YES  |     | NULL    |       |*&lt;br /&gt;
| mailboxcontext | varchar(80) | YES  |     | NULL    |       |*&lt;br /&gt;
| recording      | longblob    | YES  |     | NULL    |       |&lt;br /&gt;
+----------------+-------------+------+-----+---------+-------+&lt;br /&gt;
&lt;br /&gt;
*=Denotes new fieldnames, define EXTENDED_ODBC_STORAGE in&lt;br /&gt;
apps/Makefile to enable the functionality.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The database name (from /etc/asterisk/res_odbc.conf) is in the &lt;br /&gt;
&amp;quot;odbcstorage&amp;quot; variable in the general section of voicemail.conf.&lt;br /&gt;
&lt;br /&gt;
You may modify the voicemessages table name by using &lt;br /&gt;
odbctable=??? in voicemail.conf&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/MP3</id>
		<title>MP3</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/MP3"/>
				<updated>2007-09-04T13:35:12Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* MP3 Music On Hold&lt;br /&gt;
Asterisk supports mp3 playback for music on hold via the mpg123&lt;br /&gt;
program, available from www.mpg123.de.&lt;br /&gt;
&lt;br /&gt;
The latest release of mpg123 is mpg123 0.59r.&lt;br /&gt;
The latest development release of mpg123 is mpg123 pre0.59s.&lt;br /&gt;
&lt;br /&gt;
Please use mpg123 0.59r.  Using mpg123 pre0.59s can/may/will result&lt;br /&gt;
in crashes and/or unreliable playback.&lt;br /&gt;
&lt;br /&gt;
Running &amp;quot;make mpg123&amp;quot; in the Asterisk source directory will&lt;br /&gt;
download and make the working version.&lt;br /&gt;
&lt;br /&gt;
* MP3 Format driver&lt;br /&gt;
A format driver for reading MP3 audio files is available&lt;br /&gt;
in the asterisk-addons SVN repository on svn.digium.com&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Modules</id>
		<title>Modules</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Modules"/>
				<updated>2007-09-04T13:34:39Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;All modules must have at least the following functions:&lt;br /&gt;
&lt;br /&gt;
int load_module():&lt;br /&gt;
&lt;br /&gt;
:: Do what you need to do when you get started.  This function returns 0 on success and non-zero on failure (it is not considered loaded if it fails.&lt;br /&gt;
&lt;br /&gt;
int unload_module():&lt;br /&gt;
&lt;br /&gt;
:: The module will soon be unloaded.  If any channels are using your features, you should give them a softhangup in an effort to keep the program from crashing.  Generally, unload_module is only called when the usecount is 0 or less, but the user can force unloading at their discretion, and thus a module should do its best to comply (although in some cases there may be no way to avoid a crash).  This function should return 0 on success and non-zero on failure (i.e. it cannot yet be unloaded).&lt;br /&gt;
&lt;br /&gt;
char *description():&lt;br /&gt;
&lt;br /&gt;
:: Return a description of the module's functionality.&lt;br /&gt;
&lt;br /&gt;
int usecnt():&lt;br /&gt;
&lt;br /&gt;
:: Return the number of channels, etc that are using you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; Example modules.conf&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Asterisk configuration file&lt;br /&gt;
;&lt;br /&gt;
; Module Loader configuration file&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
[modules]&lt;br /&gt;
autoload=yes&lt;br /&gt;
;&lt;br /&gt;
; Any modules that need to be loaded before the Asterisk core has been&lt;br /&gt;
; initialized (just after the logger has been initialized) can be loaded&lt;br /&gt;
; using 'preload'. This will frequently be needed if you wish to map all&lt;br /&gt;
; module configuration files into Realtime storage, since the Realtime&lt;br /&gt;
; driver will need to be loaded before the modules using those configuration&lt;br /&gt;
; files are initialized.&lt;br /&gt;
;&lt;br /&gt;
; An example of loading ODBC support would be:&lt;br /&gt;
;preload =&amp;gt; res_odbc.so&lt;br /&gt;
;preload =&amp;gt; res_config_odbc.so&lt;br /&gt;
;&lt;br /&gt;
; If you want, load the GTK console right away.  &lt;br /&gt;
; Don't load the KDE console since&lt;br /&gt;
; it's not as sophisticated right now.&lt;br /&gt;
;&lt;br /&gt;
noload =&amp;gt; pbx_gtkconsole.so&lt;br /&gt;
;load =&amp;gt; pbx_gtkconsole.so&lt;br /&gt;
noload =&amp;gt; pbx_kdeconsole.so&lt;br /&gt;
;&lt;br /&gt;
; Intercom application is obsoleted by&lt;br /&gt;
; chan_oss.  Don't load it.&lt;br /&gt;
;&lt;br /&gt;
noload =&amp;gt; app_intercom.so&lt;br /&gt;
;&lt;br /&gt;
; The 'modem' channel driver and its subdrivers are&lt;br /&gt;
; obsolete, don't load them.&lt;br /&gt;
;&lt;br /&gt;
noload =&amp;gt; chan_modem.so&lt;br /&gt;
noload =&amp;gt; chan_modem_aopen.so&lt;br /&gt;
noload =&amp;gt; chan_modem_bestdata.so&lt;br /&gt;
noload =&amp;gt; chan_modem_i4l.so&lt;br /&gt;
;&lt;br /&gt;
load =&amp;gt; res_musiconhold.so&lt;br /&gt;
;&lt;br /&gt;
; Load either OSS or ALSA, not both&lt;br /&gt;
; By default, load OSS only (automatically) and do not load ALSA&lt;br /&gt;
;&lt;br /&gt;
noload =&amp;gt; chan_alsa.so&lt;br /&gt;
;noload =&amp;gt; chan_oss.so&lt;br /&gt;
;&lt;br /&gt;
; Module names listed in &amp;quot;global&amp;quot; section will have symbols globally&lt;br /&gt;
; exported to modules loaded after them.&lt;br /&gt;
;&lt;br /&gt;
[global]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/MISDN</id>
		<title>MISDN</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/MISDN"/>
				<updated>2007-09-04T13:34:10Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; This package contains the mISDN Channel Driver for the Asterisk PBX.&lt;br /&gt;
It supports every mISDN Hardware and provides an interface for asterisk. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Features==&lt;br /&gt;
&lt;br /&gt;
* NT and TE mode&lt;br /&gt;
* PP and PMP mode&lt;br /&gt;
* BRI and PRI (with BNE1 and BN2E1 Cards)&lt;br /&gt;
* Hardware Bridging&lt;br /&gt;
* DTMF Detection in HW+mISDNdsp (much better than asterisks internal!)&lt;br /&gt;
* Display Messages to Phones (which support display msg)&lt;br /&gt;
* HOLD/RETRIEVE/TRANSFER on ISDN Phones : )&lt;br /&gt;
* Screen/ Not Screen User Number&lt;br /&gt;
* Basic EchoCancellation &lt;br /&gt;
* Volume Control &lt;br /&gt;
* Crypting with mISDNdsp (Blowfish)&lt;br /&gt;
* Data (HDLC) callthrough &lt;br /&gt;
* Data Calling (with app_ptyfork +pppd)&lt;br /&gt;
* Echo cancellation&lt;br /&gt;
* CallDeflection&lt;br /&gt;
* Some other&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Supported Hardware==&lt;br /&gt;
&lt;br /&gt;
chan_misdn supports any mISDN compatible Hardware, like HFC chip based cards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Fast Installation Guide==&lt;br /&gt;
&lt;br /&gt;
It is easy to install mISDN and mISDNuser.&lt;br /&gt;
Using the Makefile from channels/misdn.&lt;br /&gt;
You just need to type:&lt;br /&gt;
&lt;br /&gt;
 cd channels/misdn &lt;br /&gt;
 make misdn&lt;br /&gt;
&lt;br /&gt;
Then all the necessary files are fetched from isdn4linux.de.&lt;br /&gt;
&lt;br /&gt;
==Pre-Requisites==&lt;br /&gt;
&lt;br /&gt;
To compile and install this driver, you'll need at least one mISDN Driver and the mISDNuser package. Chan_misdn works with both, the current release version and the development (svn trunk) version of Asterisk. mISDNuser and mISDN must be fetched from cvs.isdn4linux.de.&lt;br /&gt;
&lt;br /&gt;
Please Note that mISDN works good for the linux-2.6.x kernels. Some of the mISDN drivers do not compile against the 2.4.x or older kernels, you can patch them, but than you'll get mysterious errors.&lt;br /&gt;
&lt;br /&gt;
Using Kernels &amp;gt; 2.6.9 works perfect. &lt;br /&gt;
&lt;br /&gt;
Ok so far so good, now follow the compilation instructions.&lt;br /&gt;
&lt;br /&gt;
!! Dont forget to create the /dev/mISDN device node.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Compilation==&lt;br /&gt;
&lt;br /&gt;
The compilation of chan_misdn requires a library which will be generated under channels/misdn/.&lt;br /&gt;
&lt;br /&gt;
To compile this library you just need to go into this directory and type make. Now you can go back to the asterisk source root and type make install again, which now should compile and install chan_misdn.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
&lt;br /&gt;
Chan_misdn is automatically installed by the asterisk installation process.&lt;br /&gt;
&lt;br /&gt;
There is a sample init.d script for loading the mISDN modules (mISDN.sample), 5Asimply copy it to /etc/init.d/ and modify it, there you can enter your cards.&lt;br /&gt;
&lt;br /&gt;
!! Forget to use capi together with chan_misdn. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
&lt;br /&gt;
First of all you must configure the mISDN drivers. Each driver module has got an options and layermask option, which tells the driver wether to start in TE, NT, PP or PMP mode (there are lots more, please read docs in misdn for that).&lt;br /&gt;
&lt;br /&gt;
After thinking about the above you'll probably want to configure the misdn.conf file which resides in the asterisk config directory (normally /etc/asterisk).&lt;br /&gt;
&lt;br /&gt;
; misdn.conf: [general]&lt;br /&gt;
The misdn.conf file contains a &amp;quot;general&amp;quot; Section, and user sections which contain misdn port settings and different Asterisk contexts.&lt;br /&gt;
&lt;br /&gt;
The general section contains especially a variable named context with which the default context is set. There is also the very important debug variable which you can set from the Asterisk cli (command line interface) or in this configuration file, bigger numbers will lead to more debug output. There's also a&lt;br /&gt;
tracefile option, which takes a path+filename where debug output is written to.&lt;br /&gt;
&lt;br /&gt;
; misdn.conf: [default] section &lt;br /&gt;
The default section is another special section which can contain all the options available int the usr/port sections. the user/port section inherit their parameters from the default section.&lt;br /&gt;
&lt;br /&gt;
; misdn.conf: user/port sections&lt;br /&gt;
The user sections have names which are unequal to &amp;quot;general&amp;quot;. Those sections contain the ports variable which mean the mISDN Ports. Here you can add multiple ports, comma separated. &lt;br /&gt;
&lt;br /&gt;
Espacially for TE-Mode Ports there is a msns variable. This variable tells the chan_misdn driver to listen for incomming calls with the given msns, you can insert a '*' as single msn, which leads in getting every incoming call (if you want to share on PMP TE S0 with a asterisk and a phone or isdn card you should insert here the msns which you'll like to give the Asterisk). Finally a context variable resides in the user sections, which tells chan_misdn where to send incoming calls to in the Asterisk dial plan (extension.conf).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Dial and Options String==&lt;br /&gt;
&lt;br /&gt;
The dial string of chan_misdn got more complex, because we added more features, so the generic dial string looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mISDN/&amp;lt;port&amp;gt;|g:&amp;lt;group&amp;gt;/&amp;lt;extension&amp;gt;[/&amp;lt;OPTIONSSTRING&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
The Optionsstring looks Like:&lt;br /&gt;
:&amp;lt;optchar1&amp;gt;&amp;lt;OptParam1&amp;gt;:&amp;lt;optchar2&amp;gt;&amp;lt;OptParam2&amp;gt;&lt;br /&gt;
&lt;br /&gt;
the &amp;quot;:&amp;quot; character is the delimiter.&lt;br /&gt;
&lt;br /&gt;
The available Optchars are: &lt;br /&gt;
	d - Send display text on called phone, text is the optparam&lt;br /&gt;
	n - don't detect dtmf tones on called channel&lt;br /&gt;
	h - make digital outgoing call&lt;br /&gt;
	c - make crypted outgoing call, param is keyindex&lt;br /&gt;
	e - perform echo cancelation on this channel, &lt;br /&gt;
	    takes taps as arguments (32,64,128,256)&lt;br /&gt;
	s - send Non Inband DTMF as inband&lt;br /&gt;
	vr - rxgain control&lt;br /&gt;
	vt - txgain control&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
chan_misdn registers a new dial plan application &amp;quot;misdn_set_opt&amp;quot; when loaded. This application takes the Optionsstring as argument.&lt;br /&gt;
&lt;br /&gt;
The Syntax is:&lt;br /&gt;
&lt;br /&gt;
 misdn_set_opt(&amp;lt;OPTIONSSTRING&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you set options in the dialstring, the options are set in the external channel. When you set options with misdn_set_opt, they are set in the current incoming channel. So if you like to use static encryption, the scenario looks as follows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Phone1 --&amp;gt; * Box 1 --&amp;gt; PSTN_TE &lt;br /&gt;
PSTN_TE --&amp;gt; * Box 2 --&amp;gt; Phone2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Encryption must be done on the PSTN sides, so the dialplan on the boxes&lt;br /&gt;
are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* Box 1:&lt;br /&gt;
exten =&amp;gt; _${CRYPT_PREFIX}X.,1,Dial(mISDN/g:outbound/:c1)&lt;br /&gt;
&lt;br /&gt;
* Box 2:&lt;br /&gt;
exten =&amp;gt; ${CRYPT_MSN},1,misdn_set_opt(:c1)&lt;br /&gt;
exten =&amp;gt; ${CRYPT_MSN},2,dial(${PHONE2})&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
misdn cli commands&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
At the Asterisk cli you can try to type in: &lt;br /&gt;
&lt;br /&gt;
misdn &amp;lt;tab&amp;gt; &amp;lt;tab&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you should see the misdn cli commands: &lt;br /&gt;
&lt;br /&gt;
- clean&lt;br /&gt;
	-&amp;gt; pid 		(cleans a broken call, use with care, leads often&lt;br /&gt;
			 to a segmentation fault)&lt;br /&gt;
- send&lt;br /&gt;
	-&amp;gt; display	(sends a Text Message to a Asterisk channel, &lt;br /&gt;
			 this channel must be an misdn channel)&lt;br /&gt;
- set&lt;br /&gt;
	-&amp;gt; debug	(sets debug level)&lt;br /&gt;
- show&lt;br /&gt;
	-&amp;gt; config	(shows the configuration options)&lt;br /&gt;
	-&amp;gt; channels	(shows the current active misdn channels)&lt;br /&gt;
	-&amp;gt; channel	(shows details about the given misdn channels)&lt;br /&gt;
	-&amp;gt; stacks	(shows the currend ports, there protocols and states)&lt;br /&gt;
	-&amp;gt; fullstacks	(shows the current active and inactive misdn channels)&lt;br /&gt;
&lt;br /&gt;
- restart &lt;br /&gt;
	-&amp;gt; port		(restarts given port (L2 Restart) )&lt;br /&gt;
&lt;br /&gt;
- reload 		(reloads misdn.conf)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can only use &amp;quot;misdn send display&amp;quot; when an Asterisk channel is created and isdn is in the correct state. &amp;quot;correct state&amp;quot; means that you have established a call to another phone (mustn't be isdn though).&lt;br /&gt;
&lt;br /&gt;
Then you use it like this:&lt;br /&gt;
&lt;br /&gt;
misdn send display mISDN/1/101 &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
where 1 is the Port of the Card where the phone is plugged in, and 101 is the msn (callerid) of the Phone to send the text to.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mISDN Variables&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
mISDN Exports/Imports a few Variables: &lt;br /&gt;
&lt;br /&gt;
 MISDN_ADDRESS_COMPLETE : 	Is either set to 1 from the Provider, or you &lt;br /&gt;
				can set it to 1 to force a sending complete.&lt;br /&gt;
				&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Debugging and sending bug reports&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
If you encounter problems, you should set up the debugging flag, usually debug=1 should be enough. the messages are divided in asterisk and misdn parts. Misdn Debug messages begin with an 'I', asterisk messages begin with an '*', the rest is clear I think. &lt;br /&gt;
&lt;br /&gt;
Please take a trace of the problem and open a report in the Asterisk issue tracker at http://bugs.digium.com in the &amp;quot;channel drivers&amp;quot; project, &amp;quot;chan_misdn&amp;quot; category. Read the bug guidelines to make sure you provide all the information needed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
Here are some examples of how to use chan_misdn in the dialplan (extensions.conf): &lt;br /&gt;
&lt;br /&gt;
 [globals]&lt;br /&gt;
 OUT_PORT=1 ; The physical Port of the Card&lt;br /&gt;
 OUT_GROUP=ExternE1 ; The Group of Ports defined in misdn.conf&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [misdnIn]&lt;br /&gt;
 exten =&amp;gt; _X.,1,Dial(mISDN/${OUT_PORT}/${EXTEN})&lt;br /&gt;
 exten =&amp;gt; _0X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1})&lt;br /&gt;
 exten =&amp;gt; _1X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1}/:dHello)&lt;br /&gt;
 exten =&amp;gt; _1X.,1,Dial(mISDN/g:${OUT_GROUP}/${EXTEN:1}/:dHello Test:n)&lt;br /&gt;
&lt;br /&gt;
In the last line you will notice the last argument (Hello), this is sended&lt;br /&gt;
as Display Message to the Phone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Known working configurations==&lt;br /&gt;
&lt;br /&gt;
In this section I'll put working configurations for chan_misdn. Beware It seems that between Kernel 2.6.3 and Kernel 2.6.8 there were lots of mISDN Bugs. I use Kernel 2.6.9 now, it works quite ok, Kernel 2.6.10+ has changed the pci_find_subgsys funktion, so hfc_multi from mISDN doesn't compile against it, you can just change pci_find_subsys to pci_get_subsys, this works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; chan_misdn-0.2.1&lt;br /&gt;
: linux-kernel &amp;gt;= 2.6.8 (but at least 2.6) &lt;br /&gt;
: asterisk &amp;gt;= v1.2 , also CVS Head&lt;br /&gt;
: mISDN/mISDNuser (3.0) from isdn.jolly.de&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Known Problems==&lt;br /&gt;
&lt;br /&gt;
; When I use mISDN-&amp;gt;IAX I cannot make Trunk calls&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; You need to use ztdummy as dummy zaptel interface for the iax timing in&lt;br /&gt;
trunking mode, simply grab libpri, zaptel and compile them (i think you need&lt;br /&gt;
to modify the makefile in zaptel to add ztdummy to the defaultly compiled&lt;br /&gt;
modules) then modprobe ztdummy, this resolves the problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; I cannot hear any tone after succesfull CONNECT to other end&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; you forgot to load mISDNdsp, which is now needed by chan_misdn for switching&lt;br /&gt;
and dtmf tone detection&lt;br /&gt;
&lt;br /&gt;
; I have strange ISDN behavior: sometimes I hear the other end, sometimes&lt;br /&gt;
not. Also I get STATUS Events with cause 100, with misdn debugging&lt;br /&gt;
&lt;br /&gt;
-&amp;gt; Please update to newest version of chan_misdn and set the te_choose_channel&lt;br /&gt;
option in misdn.conf to yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example misdn.conf==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; chan_misdn sample config&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
; general section:&lt;br /&gt;
;&lt;br /&gt;
; for debugging and general setup, things that are not bound to port groups&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
[general] &lt;br /&gt;
;&lt;br /&gt;
; Sets the Path to the misdn-init.conf (for nt_ptp mode checking)&lt;br /&gt;
;&lt;br /&gt;
misdn_init=/etc/misdn-init.conf&lt;br /&gt;
&lt;br /&gt;
; set debugging flag: &lt;br /&gt;
;   0 - No Debug&lt;br /&gt;
;   1 - mISDN Messages and * - Messages, and * - State changes&lt;br /&gt;
;   2 - Messages + Message specific Informations (e.g. bearer capability)&lt;br /&gt;
;   3 - very Verbose, the above + lots of Driver specific infos&lt;br /&gt;
;   4 - even more Verbose than 3&lt;br /&gt;
;&lt;br /&gt;
; default value: 0&lt;br /&gt;
;&lt;br /&gt;
debug=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; set debugging file and flags for mISDNuser (NT-Stack) &lt;br /&gt;
; &lt;br /&gt;
; flags can be or'ed with the following values:&lt;br /&gt;
;&lt;br /&gt;
; DBGM_NET        0x00000001&lt;br /&gt;
; DBGM_MSG        0x00000002&lt;br /&gt;
; DBGM_FSM        0x00000004&lt;br /&gt;
; DBGM_TEI        0x00000010&lt;br /&gt;
; DBGM_L2         0x00000020&lt;br /&gt;
; DBGM_L3         0x00000040&lt;br /&gt;
; DBGM_L3DATA     0x00000080&lt;br /&gt;
; DBGM_BC         0x00000100&lt;br /&gt;
; DBGM_TONE       0x00000200&lt;br /&gt;
; DBGM_BCDATA     0x00000400&lt;br /&gt;
; DBGM_MAN        0x00001000&lt;br /&gt;
; DBGM_APPL       0x00002000&lt;br /&gt;
; DBGM_ISDN       0x00004000&lt;br /&gt;
; DBGM_SOCK       0x00010000&lt;br /&gt;
; DBGM_CONN       0x00020000&lt;br /&gt;
; DBGM_CDATA      0x00040000&lt;br /&gt;
; DBGM_DDATA      0x00080000&lt;br /&gt;
; DBGM_SOUND      0x00100000&lt;br /&gt;
; DBGM_SDATA      0x00200000&lt;br /&gt;
; DBGM_TOPLEVEL   0x40000000&lt;br /&gt;
; DBGM_ALL        0xffffffff&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
ntdebugflags=0&lt;br /&gt;
ntdebugfile=/var/log/misdn-nt.log&lt;br /&gt;
&lt;br /&gt;
; the big trace&lt;br /&gt;
;&lt;br /&gt;
; default value: [not set]&lt;br /&gt;
;&lt;br /&gt;
;tracefile=/var/log/asterisk/misdn.log&lt;br /&gt;
&lt;br /&gt;
; set to yes if you want mISDN_dsp to bridge the calls in HW&lt;br /&gt;
;&lt;br /&gt;
; default value: yes&lt;br /&gt;
;&lt;br /&gt;
bridging=no&lt;br /&gt;
&lt;br /&gt;
; stops dialtone after getting first digit on nt Port&lt;br /&gt;
;&lt;br /&gt;
; default value: yes&lt;br /&gt;
;&lt;br /&gt;
stop_tone_after_first_digit=yes&lt;br /&gt;
&lt;br /&gt;
; whether to append overlapdialed Digits to Extension or not &lt;br /&gt;
;&lt;br /&gt;
; default value: yes&lt;br /&gt;
;&lt;br /&gt;
append_digits2exten=yes&lt;br /&gt;
&lt;br /&gt;
;;; CRYPTION STUFF&lt;br /&gt;
&lt;br /&gt;
; Whether to look for dynamic crypting attempt&lt;br /&gt;
;&lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
dynamic_crypt=no&lt;br /&gt;
&lt;br /&gt;
; crypt_prefix, what is used for crypting Protocol&lt;br /&gt;
;&lt;br /&gt;
; default value: [not set]&lt;br /&gt;
;&lt;br /&gt;
crypt_prefix=**&lt;br /&gt;
&lt;br /&gt;
; Keys for cryption, you reference them in the dialplan&lt;br /&gt;
; later also in dynamic encr.&lt;br /&gt;
;&lt;br /&gt;
; default value: [not set]&lt;br /&gt;
;&lt;br /&gt;
crypt_keys=test,muh&lt;br /&gt;
&lt;br /&gt;
; users sections:&lt;br /&gt;
; &lt;br /&gt;
; name your sections as you which but not &amp;quot;general&amp;quot; ! &lt;br /&gt;
; the sections are Groups, you can dial out in extensions.conf&lt;br /&gt;
; with Dial(mISDN/g:extern/101) where extern is a section name, &lt;br /&gt;
; chan_misdn tries every port in this section to find a &lt;br /&gt;
; new free channel&lt;br /&gt;
; &lt;br /&gt;
&lt;br /&gt;
; The default section is not a group section, it just contains config elements&lt;br /&gt;
; which are inherited by group sections.&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
[default]&lt;br /&gt;
&lt;br /&gt;
; define your default context here&lt;br /&gt;
;&lt;br /&gt;
; default value: default&lt;br /&gt;
;&lt;br /&gt;
context=misdn&lt;br /&gt;
&lt;br /&gt;
; language&lt;br /&gt;
;&lt;br /&gt;
; default value: en&lt;br /&gt;
;&lt;br /&gt;
language=en&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; sets the musiconhold class&lt;br /&gt;
;&lt;br /&gt;
musicclass=default&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Either if we should produce DTMF Tones ourselves&lt;br /&gt;
; &lt;br /&gt;
senddtmf=yes&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; If we should generate Ringing for chan_sip and others&lt;br /&gt;
;&lt;br /&gt;
far_alerting=no&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; here you can define which bearers should be allowed&lt;br /&gt;
;&lt;br /&gt;
allowed_bearers=all&lt;br /&gt;
&lt;br /&gt;
; Prefixes for national and international, those are put before the &lt;br /&gt;
; oad if an according dialplan is set by the other end. &lt;br /&gt;
;&lt;br /&gt;
; default values: nationalprefix      : 0&lt;br /&gt;
;                 internationalprefix : 00&lt;br /&gt;
;&lt;br /&gt;
nationalprefix=0&lt;br /&gt;
internationalprefix=00&lt;br /&gt;
&lt;br /&gt;
; set rx/tx gains between -8 and 8 to change the RX/TX Gain&lt;br /&gt;
;&lt;br /&gt;
; default values: rxgain: 0&lt;br /&gt;
;                 txgain: 0&lt;br /&gt;
;&lt;br /&gt;
rxgain=0&lt;br /&gt;
txgain=0&lt;br /&gt;
&lt;br /&gt;
; some telcos especially in NL seem to need this set to yes, also in &lt;br /&gt;
; switzerland this seems to be important&lt;br /&gt;
;&lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
te_choose_channel=no&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; This option defines, if chan_misdn should check the L1 on  a PMP &lt;br /&gt;
; before making a group call on it. The L1 may go down for PMP Ports&lt;br /&gt;
; so we might need this.&lt;br /&gt;
; But be aware! a broken or plugged off cable might be used for a group call&lt;br /&gt;
; as well, since chan_misdn has no chance to distinguish if the L1 is down&lt;br /&gt;
; because of a lost Link or because the Provider shut it down...&lt;br /&gt;
;&lt;br /&gt;
; default: no&lt;br /&gt;
;&lt;br /&gt;
pmp_l1_check=no&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; in PMP this option defines which cause should be sent out to &lt;br /&gt;
; the 3. caller. chan_misdn does not support callwaiting on TE&lt;br /&gt;
; PMP side. This allows to modify the RELEASE_COMPLETE cause &lt;br /&gt;
; at least.&lt;br /&gt;
;&lt;br /&gt;
reject_cause=16&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Send Setup_Acknowledge on incoming calls anyway (instead of PROCEEDING), &lt;br /&gt;
; this requests additional Infos, so we can waitfordigits &lt;br /&gt;
; without much issues. This works only for PTP Ports&lt;br /&gt;
; &lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
need_more_infos=no&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; set this to yes if you want to disconnect calls when a timeout occurs&lt;br /&gt;
; for example during the overlapdial phase&lt;br /&gt;
;&lt;br /&gt;
nttimeout=no&lt;br /&gt;
&lt;br /&gt;
; set the method to use for channel selection:&lt;br /&gt;
;   standard    - always choose the first free channel with the lowest number&lt;br /&gt;
;   round_robin - use the round robin algorithm to select a channel. use this&lt;br /&gt;
;                 if you want to balance your load.&lt;br /&gt;
;&lt;br /&gt;
; default value: standard&lt;br /&gt;
;&lt;br /&gt;
method=standard&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; dialplan means Type Of Number in ISDN Terms (for outgoing calls)&lt;br /&gt;
;&lt;br /&gt;
; there are different types of the dialplan:&lt;br /&gt;
;&lt;br /&gt;
; dialplan -&amp;gt; outgoing Number&lt;br /&gt;
; localdialplan -&amp;gt; callerid&lt;br /&gt;
; cpndialplan -&amp;gt; connected party number&lt;br /&gt;
;&lt;br /&gt;
; dialplan options: &lt;br /&gt;
;&lt;br /&gt;
; 0 - unknown&lt;br /&gt;
; 1 - International&lt;br /&gt;
; 2 - National&lt;br /&gt;
; 4 - Subscriber&lt;br /&gt;
;&lt;br /&gt;
; This setting is used for outgoing calls&lt;br /&gt;
;&lt;br /&gt;
; default value: 0&lt;br /&gt;
;&lt;br /&gt;
dialplan=0&lt;br /&gt;
localdialplan=0&lt;br /&gt;
cpndialplan=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; turn this to no if you don't mind correct handling of Progress Indicators  &lt;br /&gt;
;&lt;br /&gt;
early_bconnect=yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; turn this on if you like to send Tone Indications to a Incoming&lt;br /&gt;
; isdn channel on a TE Port. Rarely used, only if the Telco allows&lt;br /&gt;
; you to send indications by yourself, normally the Telco sends the &lt;br /&gt;
; indications to the remote party.&lt;br /&gt;
; &lt;br /&gt;
; default: no&lt;br /&gt;
;&lt;br /&gt;
incoming_early_audio=no&lt;br /&gt;
&lt;br /&gt;
; uncomment the following to get into s extension at extension conf&lt;br /&gt;
; there you can use DigitTimeout if you can't or don't want to use&lt;br /&gt;
; isdn overlap dial. &lt;br /&gt;
; note: This will jump into the s exten for every exten!&lt;br /&gt;
;&lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
;always_immediate=no&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; set this to yes if you want to generate your own dialtone &lt;br /&gt;
; with always_immediate=yes, else chan_misdn generates the dialtone&lt;br /&gt;
;&lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
nodialtone=no&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
; uncomment the following if you want callers which called exactly the &lt;br /&gt;
; base number (so no extension is set) jump to the s extension.&lt;br /&gt;
; if the user dials something more it jumps to the correct extension &lt;br /&gt;
; instead&lt;br /&gt;
;&lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
;immediate=no&lt;br /&gt;
&lt;br /&gt;
; uncomment the following to have hold and retrieve support&lt;br /&gt;
;&lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
;hold_allowed=yes&lt;br /&gt;
&lt;br /&gt;
; Pickup and Callgroup&lt;br /&gt;
;&lt;br /&gt;
; default values: not set = 0&lt;br /&gt;
;&lt;br /&gt;
;callgroup=1&lt;br /&gt;
;pickupgroup=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; these are the exact isdn screening and presentation indicators&lt;br /&gt;
; if -1 is given for both values the presentation indicators are used&lt;br /&gt;
; from asterisks SetCallerPres application.&lt;br /&gt;
; s=0, p=0 -&amp;gt; callerid presented not screened&lt;br /&gt;
; s=1, p=1 -&amp;gt; callerid presented but screened (the remote end does not see it!)&lt;br /&gt;
; &lt;br /&gt;
; default values s=-1, p=-1&lt;br /&gt;
presentation=-1&lt;br /&gt;
screen=-1&lt;br /&gt;
&lt;br /&gt;
; this enables echocancellation, with the given number of taps&lt;br /&gt;
; be aware, move this setting only to outgoing portgroups!&lt;br /&gt;
; A value of zero turns echocancellation off.&lt;br /&gt;
;&lt;br /&gt;
; possible values are: 0,32,64,128,256,yes(=128),no(=0)&lt;br /&gt;
;&lt;br /&gt;
; default value: no&lt;br /&gt;
;&lt;br /&gt;
;echocancel=no&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; chan_misdns jitterbuffer, default 4000&lt;br /&gt;
; &lt;br /&gt;
jitterbuffer=4000&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; change this threshold to enable dejitter functionality&lt;br /&gt;
;&lt;br /&gt;
jitterbuffer_upper_threshold=0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; change this to yes, if you want to bridge a mISDN data channel to &lt;br /&gt;
; another channel type or to an application.&lt;br /&gt;
;&lt;br /&gt;
hdlc=no&lt;br /&gt;
&lt;br /&gt;
[intern]&lt;br /&gt;
; define your ports, e.g. 1,2 (depends on mISDN-driver loading order) &lt;br /&gt;
ports=1,2&lt;br /&gt;
; context where to go to when incoming Call on one of the above ports&lt;br /&gt;
context=Intern&lt;br /&gt;
&lt;br /&gt;
[internPP]&lt;br /&gt;
;&lt;br /&gt;
; adding the postfix 'ptp' to a port number is obsolete now, chan_misdn&lt;br /&gt;
; parses /etc/misdn-init.conf and sets the ptp mode to the corresponding&lt;br /&gt;
; configs. For backwards compatibility you can still set ptp here.&lt;br /&gt;
;&lt;br /&gt;
ports=3&lt;br /&gt;
	&lt;br /&gt;
[first_extern]&lt;br /&gt;
; again port defs&lt;br /&gt;
ports=4&lt;br /&gt;
; again a context for incoming calls&lt;br /&gt;
context=Extern1&lt;br /&gt;
; msns for te ports, listen on those numbers on the above ports, and &lt;br /&gt;
; indicate the incoming calls to asterisk&lt;br /&gt;
; here you can give a comma separated list or simply an '*' for &lt;br /&gt;
; any msn. &lt;br /&gt;
msns=*&lt;br /&gt;
&lt;br /&gt;
; here an example with given msns&lt;br /&gt;
[second_extern]&lt;br /&gt;
ports=5&lt;br /&gt;
context=Extern2&lt;br /&gt;
callerid=15&lt;br /&gt;
msns=102,144,101,104&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/MeetMe</id>
		<title>MeetMe</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/MeetMe"/>
				<updated>2007-09-04T13:33:43Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Configuration file for MeetMe simple conference rooms for Asterisk of course&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  -= Info about application 'MeetMe' =-&lt;br /&gt;
&lt;br /&gt;
[Synopsis]&lt;br /&gt;
MeetMe conference bridge&lt;br /&gt;
&lt;br /&gt;
[Description]&lt;br /&gt;
  MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe conference.&lt;br /&gt;
If the conference number is omitted, the user will be prompted to enter&lt;br /&gt;
one.&lt;br /&gt;
User can exit the conference by hangup, or if the 'p' option is specified, by pressing '#'.&lt;br /&gt;
&lt;br /&gt;
Please note: The Zaptel kernel modules and at least one hardware driver (or ztdummy)&lt;br /&gt;
             must be present for conferencing to operate properly. In addition, the chan_zap&lt;br /&gt;
             channel driver must be loaded for the 'i' and 'r' options to operate at all.&lt;br /&gt;
&lt;br /&gt;
The option string may contain zero or more of the following characters:&lt;br /&gt;
      'a' -- set admin mode&lt;br /&gt;
      'A' -- set marked mode&lt;br /&gt;
      'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}&lt;br /&gt;
             Default: conf-background.agi&lt;br /&gt;
             (Note: This does not work with non-Zap channels in the same conference)&lt;br /&gt;
      'c' -- announce user(s) count on joining a conference&lt;br /&gt;
      'd' -- dynamically add conference&lt;br /&gt;
      'D' -- dynamically add conference, prompting for a PIN&lt;br /&gt;
      'e' -- select an empty conference&lt;br /&gt;
      'E' -- select an empty pinless conference&lt;br /&gt;
      'i' -- announce user join/leave&lt;br /&gt;
      'm' -- set monitor only mode (Listen only, no talking)&lt;br /&gt;
      'M' -- enable music on hold when the conference has a single caller&lt;br /&gt;
      'p' -- allow user to exit the conference by pressing '#'&lt;br /&gt;
      'P' -- always prompt for the pin even if it is specified&lt;br /&gt;
      'q' -- quiet mode (don't play enter/leave sounds)&lt;br /&gt;
      'r' -- Record conference (records as ${MEETME_RECORDINGFILE}&lt;br /&gt;
             using format ${MEETME_RECORDINGFORMAT}). Default filename is&lt;br /&gt;
             meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is wav.&lt;br /&gt;
      's' -- Present menu (user or admin) when '*' is received ('send' to menu)&lt;br /&gt;
      't' -- set talk only mode. (Talk only, no listening)&lt;br /&gt;
      'T' -- set talker detection (sent to manager interface and meetme list)&lt;br /&gt;
      'w[(&amp;lt;secs&amp;gt;)]'&lt;br /&gt;
          -- wait until the marked user enters the conference&lt;br /&gt;
      'x' -- close the conference when last marked user exits&lt;br /&gt;
      'X' -- allow user to exit the conference by entering a valid single&lt;br /&gt;
             digit extension ${MEETME_EXIT_CONTEXT} or the current context&lt;br /&gt;
             if that variable is not defined.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: meetme.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Configuration file for MeetMe simple conference rooms for Asterisk of course.&lt;br /&gt;
;&lt;br /&gt;
; This configuration file is read every time you call app meetme()&lt;br /&gt;
&lt;br /&gt;
[general]&lt;br /&gt;
;audiobuffers=32		; The number of 20ms audio buffers to be used&lt;br /&gt;
				; when feeding audio frames from non-Zap channels&lt;br /&gt;
				; into the conference; larger numbers will allow&lt;br /&gt;
				; for the conference to 'de-jitter' audio that arrives&lt;br /&gt;
				; at different timing than the conference's timing&lt;br /&gt;
				; source, but can also allow for latency in hearing&lt;br /&gt;
				; the audio from the speaker. Minimum value is 2,&lt;br /&gt;
				; maximum value is 32.&lt;br /&gt;
;&lt;br /&gt;
[rooms]&lt;br /&gt;
;&lt;br /&gt;
; Usage is conf =&amp;gt; confno[,pin][,adminpin]	&lt;br /&gt;
;&lt;br /&gt;
; Note that once a participant has called the conference, a change to the pin&lt;br /&gt;
; number done in this file will not take effect until there are no more users&lt;br /&gt;
; in the conference and it goes away.  When it is created again, it will have&lt;br /&gt;
; the new pin number.&lt;br /&gt;
;&lt;br /&gt;
;conf =&amp;gt; 1234 &lt;br /&gt;
;conf =&amp;gt; 2345,9938&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Manager</id>
		<title>Manager</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Manager"/>
				<updated>2007-09-04T13:33:13Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;;The Asterisk Manager TCP/IP API - AMI&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
The manager is a client/server model over TCP. With the manager interface, you'll be able to control the PBX, originate calls, check mailbox status, monitor channels and queues as well as execute Asterisk commands.&lt;br /&gt;
&lt;br /&gt;
AMI is the standard management interface into your Asterisk server. You configure AMI in manager.conf. By default, AMI is available on TCP port 5038 if you enable it in manager.conf.&lt;br /&gt;
&lt;br /&gt;
AMI receive commands, called &amp;quot;actions&amp;quot;. These generate a &amp;quot;response&amp;quot; from Asterisk. Asterisk will also send &amp;quot;Events&amp;quot; containing various information messages about changes within Asterisk. Some actions generate an initial response and data in the form list of events. This format is created to make sure that extensive reports do not block the manager interface fully.&lt;br /&gt;
&lt;br /&gt;
Management users are configured in the configuration file manager.conf and are given permissions for read and write, where write represents their ability to perform this class of &amp;quot;action&amp;quot;, and read represents their ability to receive this class of &amp;quot;event&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The Asterisk manager interface in version 1.0.x of Asterisk is not very well standardized. Work is under way to change this to Asterisk 1.2. If you develop AMI applications, treat the headers in Actions, Events and Responses as local to that particular message. There is no cross-message standardization of headers.&lt;br /&gt;
&lt;br /&gt;
If you develop applications, please try to reuse existing manager headers and their interpretation. If you are unsure, discuss on the asterisk-dev mailing list.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Command Syntax==&lt;br /&gt;
----&lt;br /&gt;
Management communication consists of tags of the form &amp;quot;header: value&amp;quot;, terminated with an empty newline (\r\n) in the style of SMTP, HTTP, and other headers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first tag MUST be one of the following:&lt;br /&gt;
&lt;br /&gt;
* Action: An action requested by the CLIENT to the Asterisk SERVER.&lt;br /&gt;
::Only one &amp;quot;Action&amp;quot; may be outstanding at any time.&lt;br /&gt;
* Response: A response to an action from the Asterisk SERVER to the CLIENT.&lt;br /&gt;
* Event: An event reported by the Asterisk SERVER to the CLIENT &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Manager commands==&lt;br /&gt;
----&lt;br /&gt;
Output from the CLI command 'show manager' command:&lt;br /&gt;
&lt;br /&gt;
    * Ping: Ping&lt;br /&gt;
    * Logoff: Logoff Manager&lt;br /&gt;
    * Hangup: Hangup Channel&lt;br /&gt;
    * Status: Status&lt;br /&gt;
    * Redirect: Redirect&lt;br /&gt;
    * Originate: Originate Call&lt;br /&gt;
    * MailboxStatus: Check Mailbox&lt;br /&gt;
    * Command: Execute Command&lt;br /&gt;
    * ExtensionState: Check Extension Status&lt;br /&gt;
    * AbsoluteTimeout: Set Absolute Timeout&lt;br /&gt;
    * MailboxCount: Check Mailbox Message Count&lt;br /&gt;
    * Monitor: Monitor a channel&lt;br /&gt;
    * StopMonitor: Stop monitoring a channel&lt;br /&gt;
    * ChangeMonitor: Change monitoring filename of a channel&lt;br /&gt;
    * IAXpeers: List IAX Peers (Defaults to IAX2)&lt;br /&gt;
    * SIPpeers: List SIP peers&lt;br /&gt;
    * SIPshowpeer: Show data about one SIP peer&lt;br /&gt;
    * Queues: Queues&lt;br /&gt;
    * QueueStatus: Queue Status &lt;br /&gt;
&lt;br /&gt;
This list depends on the version of Asterisk you are using, as well as which modules that are loaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Command Summary==&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Command: Command&lt;br /&gt;
Parameters: Command&lt;br /&gt;
&lt;br /&gt;
Command: ExtensionState&lt;br /&gt;
Parameters: Exten, Context, ActionID&lt;br /&gt;
&lt;br /&gt;
Command: Hangup&lt;br /&gt;
Parameters: Channel&lt;br /&gt;
&lt;br /&gt;
Command: Logoff&lt;br /&gt;
Parameters: None&lt;br /&gt;
&lt;br /&gt;
Command: MailboxCount&lt;br /&gt;
Parameters: Mailbox, ActionID&lt;br /&gt;
&lt;br /&gt;
Command: MailboxStatus&lt;br /&gt;
Parameters: Mailbox, ActionID&lt;br /&gt;
&lt;br /&gt;
Command: Originate&lt;br /&gt;
Parameters: Channel, Exten, Context, Priority, Timeout, &lt;br /&gt;
   CallerID, Variable, Account, Application, Data, Async&lt;br /&gt;
&lt;br /&gt;
Command: Ping&lt;br /&gt;
Parameters: None&lt;br /&gt;
&lt;br /&gt;
Command: Redirect&lt;br /&gt;
Parameters: Channel, ExtraChannel, Exten, Context, Priority&lt;br /&gt;
&lt;br /&gt;
Command: Timeout&lt;br /&gt;
Parameters: Channel, Timeout&lt;br /&gt;
&lt;br /&gt;
You can always get more information about a manager command&lt;br /&gt;
with the &amp;quot;show manager command &amp;lt;command&amp;gt;&amp;quot; CLI command in Asterisk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
----&lt;br /&gt;
Login - Log a user into the manager interface.&lt;br /&gt;
&lt;br /&gt;
   Action: Login&lt;br /&gt;
   Username: testuser&lt;br /&gt;
   Secret: testsecret&lt;br /&gt;
&lt;br /&gt;
Originate - Originate a call from a channel to an extension.&lt;br /&gt;
&lt;br /&gt;
   Action: Originate&lt;br /&gt;
   Channel: sip/12345&lt;br /&gt;
   Exten: 1234&lt;br /&gt;
   Context: default&lt;br /&gt;
&lt;br /&gt;
Originate - Originate a call from a channel to an extension without waiting&lt;br /&gt;
for call to complete.&lt;br /&gt;
&lt;br /&gt;
   Action: Originate&lt;br /&gt;
   Channel: sip/12345&lt;br /&gt;
   Exten: 1234&lt;br /&gt;
   Context: default&lt;br /&gt;
   Async: yes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Redirect with ExtraChannel:&lt;br /&gt;
&lt;br /&gt;
Attempted goal:&lt;br /&gt;
Have a 'robot' program Redirect both ends of an already-connected call to a meetme room using the ExtraChannel feature through the management interface.&lt;br /&gt;
&lt;br /&gt;
  Action: Redirect&lt;br /&gt;
  Channel: Zap/1-1&lt;br /&gt;
  ExtraChannel: SIP/3064-7e00 (varies)&lt;br /&gt;
  Exten: 680&lt;br /&gt;
  Priority: 1&lt;br /&gt;
&lt;br /&gt;
Where 680 is an extension that sends you to a MeetMe room.&lt;br /&gt;
&lt;br /&gt;
There are a number of GUI tools that use the manager interface, please search the mailing list archives and the documentation page on the http://www.asterisk.org web site for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Some standard AMI headers==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 Account: 			-- Account Code (Status)&lt;br /&gt;
 AccountCode:			-- Account Code (cdr_manager)&lt;br /&gt;
 ACL: &amp;lt;Y | N&amp;gt;			-- Does ACL exist for object ?&lt;br /&gt;
 Action: &amp;lt;action&amp;gt;		-- request or notification of a particular action&lt;br /&gt;
 Address-IP:			-- IPaddress &lt;br /&gt;
 Address-Port:			-- IP port number&lt;br /&gt;
 Agent:  &amp;lt;string&amp;gt;		-- Agent name&lt;br /&gt;
 AMAflags:			-- AMA flag (cdr_manager, sippeers)&lt;br /&gt;
 AnswerTime:			-- Time of answer (cdr_manager)&lt;br /&gt;
 Append: &amp;lt;bool&amp;gt;			-- CDR userfield Append flag&lt;br /&gt;
 Application:			-- Application to use&lt;br /&gt;
 Async:				-- Whether or not to use fast setup&lt;br /&gt;
 AuthType: 			-- Authentication type (for login or challenge) &amp;quot;md5&amp;quot;&lt;br /&gt;
 BillableSeconds:		-- Billable seconds for call (cdr_manager)&lt;br /&gt;
 CallerID:			-- Caller id (name and number in Originate &amp;amp; cdr_manager)&lt;br /&gt;
 CallerID:			-- CallerID number&lt;br /&gt;
       !Number or &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot; or &amp;quot;unknown&amp;quot; (should change to &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot; in app_queue)&lt;br /&gt;
 CallerID1:                     -- Channel 1 CallerID (Link event)&lt;br /&gt;
 CallerID2:                     -- Channel 2 CallerID (Link event)&lt;br /&gt;
 CallerIDName:			-- CallerID name&lt;br /&gt;
       !Name or &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot; or &amp;quot;unknown&amp;quot; (should change to &amp;quot;&amp;lt;unknown&amp;gt;&amp;quot; in app_queue)&lt;br /&gt;
 Callgroup:			-- Call group for peer/user&lt;br /&gt;
 CallsTaken: &amp;lt;num&amp;gt;		-- Queue status variable&lt;br /&gt;
 Cause: &amp;lt;value&amp;gt;			-- Event change cause - &amp;quot;Expired&amp;quot;&lt;br /&gt;
 Cause: &amp;lt;value&amp;gt;			-- Hangupcause (channel.c)&lt;br /&gt;
 CID-CallingPres:		-- Caller ID calling presentation&lt;br /&gt;
 Channel: &amp;lt;channel&amp;gt;		-- Channel specifier&lt;br /&gt;
 Channel: &amp;lt;dialstring&amp;gt;		-- Dialstring in Originate&lt;br /&gt;
 Channel: &amp;lt;tech/[peer/username]&amp;gt; -- Channel in Registry events (SIP, IAX2)&lt;br /&gt;
 Channel: &amp;lt;tech&amp;gt;		-- Technology (SIP/IAX2 etc) in Registry events&lt;br /&gt;
 ChannelType:			-- Tech: SIP, IAX2, ZAP, MGCP etc&lt;br /&gt;
 Channel1:			-- Link channel 1&lt;br /&gt;
 Channel2:			-- Link channel 2&lt;br /&gt;
 ChanObjectType:		-- &amp;quot;peer&amp;quot;, &amp;quot;user&amp;quot;&lt;br /&gt;
 Codecs:			-- Codec list&lt;br /&gt;
 CodecOrder:			-- Codec order, separated with comma &amp;quot;,&amp;quot;&lt;br /&gt;
 Command:			-- Cli command to run&lt;br /&gt;
 Context:			-- Context&lt;br /&gt;
 Count: &amp;lt;num&amp;gt;			-- Number of callers in queue&lt;br /&gt;
 Data:				-- Application data&lt;br /&gt;
 Default-addr-IP:		-- IP address to use before registration&lt;br /&gt;
 Default-Username:		-- Username part of URI to use before registration&lt;br /&gt;
 Destination:			-- Destination for call (Dialstring ) (dial, cdr_manager)&lt;br /&gt;
 DestinationContext:		-- Destination context (cdr_manager)&lt;br /&gt;
 DestinationChannel:		-- Destination channel (cdr_manager)&lt;br /&gt;
 DestUniqueID:			-- UniqueID of destination (dial event)&lt;br /&gt;
 Disposition:			-- Call disposition (CDR manager)&lt;br /&gt;
 Domain: &amp;lt;domain&amp;gt;		-- DNS domain&lt;br /&gt;
 Duration: &amp;lt;secs&amp;gt;		-- Duration of call (cdr_manager)&lt;br /&gt;
 Dynamic: &amp;lt;Y |  N&amp;gt;		-- Device registration supported?&lt;br /&gt;
 Endtime:			-- End time stamp of call (cdr_manager)&lt;br /&gt;
 EventList: &amp;lt;flag&amp;gt;		-- Flag being &amp;quot;Start&amp;quot;, &amp;quot;End&amp;quot;, &amp;quot;Cancelled&amp;quot; or &amp;quot;ListObject&amp;quot;&lt;br /&gt;
 Events: &amp;lt;eventmask&amp;gt;		-- Eventmask filter (&amp;quot;on&amp;quot;, &amp;quot;off&amp;quot;, &amp;quot;system&amp;quot;, &amp;quot;call&amp;quot;, &amp;quot;log&amp;quot;)&lt;br /&gt;
 Exten:				-- Extension (Redirect command)&lt;br /&gt;
 Extension:			-- Extension (Status)&lt;br /&gt;
 Family: &amp;lt;string&amp;gt;		-- ASTdb key family&lt;br /&gt;
 File: &amp;lt;filename&amp;gt;		-- Filename (monitor)&lt;br /&gt;
 Format: &amp;lt;format&amp;gt;		-- Format of sound file (monitor)&lt;br /&gt;
 From: &amp;lt;time&amp;gt;			--  Parking time (ParkedCall event)&lt;br /&gt;
 Hint:				-- Extension hint&lt;br /&gt;
 Incominglimit:			-- SIP Peer incoming limit&lt;br /&gt;
 Key:&lt;br /&gt;
 Key:				-- ASTdb Database key&lt;br /&gt;
 LastApplication:		-- Last application executed (cdr_manager)&lt;br /&gt;
 LastCall: &amp;lt;num&amp;gt;		-- Last call in queue&lt;br /&gt;
 LastData:			-- Data for last application (cdr_manager)&lt;br /&gt;
 Link:				-- (Status)&lt;br /&gt;
 ListItems: &amp;lt;number&amp;gt;		-- Number of items in Eventlist (Optionally sent in &amp;quot;end&amp;quot; packet)&lt;br /&gt;
 Location:			-- Interface (whatever that is -maybe tech/name in app_queue )&lt;br /&gt;
 Loginchan:			-- Login channel for agent&lt;br /&gt;
 Logintime: &amp;lt;number&amp;gt;		-- Login time for agent&lt;br /&gt;
 Mailbox:			-- VM Mailbox (id@vmcontext) (mailboxstatus, mailboxcount)&lt;br /&gt;
 MD5SecretExist: &amp;lt;Y | N&amp;gt;	-- Whether secret exists in MD5 format &lt;br /&gt;
 Membership: &amp;lt;string&amp;gt;		-- &amp;quot;Dynamic&amp;quot; or &amp;quot;static&amp;quot; member in queue&lt;br /&gt;
 Message: &amp;lt;text&amp;gt;		-- Text message in ACKs, errors (explanation)&lt;br /&gt;
 Mix: &amp;lt;bool&amp;gt; 			-- Boolean parameter (monitor) &lt;br /&gt;
 NewMessages: &amp;lt;count&amp;gt;	 	-- Count of new Mailbox messages (mailboxcount)&lt;br /&gt;
 Newname:		&lt;br /&gt;
 ObjectName:			-- Name of object in list&lt;br /&gt;
 OldName:			-- Something in Rename (channel.c)&lt;br /&gt;
 OldMessages: &amp;lt;count&amp;gt;		-- Count of old mailbox messages (mailboxcount)	&lt;br /&gt;
 Outgoinglimit:			-- SIP Peer outgoing limit&lt;br /&gt;
 Paused: &amp;lt;num&amp;gt;			-- Queue member paused status&lt;br /&gt;
 Peer: &amp;lt;tech/name&amp;gt;		-- &amp;quot;channel&amp;quot; specifier :-)&lt;br /&gt;
 PeerStatus: &amp;lt;tech/name&amp;gt;	-- Peer status code &amp;quot;Unregistred&amp;quot;, &amp;quot;Registred&amp;quot;, &amp;quot;Lagged&amp;quot;, &amp;quot;Reachable&amp;quot;&lt;br /&gt;
 Penalty: &amp;lt;num&amp;gt;			-- Queue penalty&lt;br /&gt;
 Priority:			-- Extension priority&lt;br /&gt;
 Privilege: &amp;lt;privilege&amp;gt;		-- AMI authorization class (system, call, log, verbose, command, agent, user)&lt;br /&gt;
 Pickupgroup:			-- Pickup group for peer&lt;br /&gt;
 Position: &amp;lt;num&amp;gt;		-- Position in Queue&lt;br /&gt;
 Queue:				-- Queue name&lt;br /&gt;
 Reason:			-- &amp;quot;Autologoff&amp;quot;&lt;br /&gt;
 Response: &amp;lt;response&amp;gt;		-- response code, like &amp;quot;200 OK&amp;quot; &amp;quot;Success&amp;quot;, &amp;quot;Error&amp;quot;, &amp;quot;Follows&amp;quot;&lt;br /&gt;
 Restart:			-- &amp;quot;True&amp;quot;, &amp;quot;False&amp;quot;&lt;br /&gt;
 RegExpire:			-- SIP registry expire&lt;br /&gt;
 RegExpiry:			-- SIP registry expiry&lt;br /&gt;
 Reason:			-- Originate reason code&lt;br /&gt;
 Seconds:			-- Seconds (Status)&lt;br /&gt;
 Secret: &amp;lt;password&amp;gt;		-- Authentication secret (for login)&lt;br /&gt;
 SecretExist: &amp;lt;Y | N&amp;gt;		-- Whether secret exists &lt;br /&gt;
 Shutdown:			-- &amp;quot;Uncleanly&amp;quot;, &amp;quot;Cleanly&amp;quot; &lt;br /&gt;
 SIP-AuthInsecure:&lt;br /&gt;
 SIP-FromDomain:		-- Peer FromDomain&lt;br /&gt;
 SIP-FromUser:			-- Peer FromUser&lt;br /&gt;
 SIP-NatSupport:&lt;br /&gt;
 SIPLastMsg:&lt;br /&gt;
 Source:			-- Source of call (dial event, cdr_manager)&lt;br /&gt;
 SrcUniqueID:			-- UniqueID of source (dial event)&lt;br /&gt;
 StartTime: 			-- Start time of call (cdr_manager)&lt;br /&gt;
 State:				-- Channel state&lt;br /&gt;
 Status:			-- Registration status (Registry events SIP)&lt;br /&gt;
 Status:			-- Extension status (Extensionstate)&lt;br /&gt;
 Status:			-- Peer status (if monitored)  ** Will change name ** &amp;quot;unknown&amp;quot;,&amp;quot;lagged&amp;quot;, &amp;quot;ok&amp;quot;&lt;br /&gt;
 Status: &amp;lt;num&amp;gt;			-- Queue Status&lt;br /&gt;
 Status:			-- DND status (DNDState)&lt;br /&gt;
 Time: &amp;lt;sec&amp;gt;			-- Roundtrip time (latency)&lt;br /&gt;
 Timeout:			-- Parking timeout time&lt;br /&gt;
 Timeout:			-- Timeout for call setup (Originate)&lt;br /&gt;
 Timeout: &amp;lt;seconds&amp;gt;		-- Timout for call&lt;br /&gt;
 Uniqueid:			-- Channel Unique ID&lt;br /&gt;
 Uniqueid1:			-- Channel 1 Unique ID (Link event)&lt;br /&gt;
 Uniqueid2:			-- Channel 2 Unique ID (Link event)&lt;br /&gt;
 User:				-- Username (SIP registry)&lt;br /&gt;
 UserField:			-- CDR userfield (cdr_manager)&lt;br /&gt;
 Val:				-- Value to set/read in ASTdb&lt;br /&gt;
 Variable:			-- Variable AND value to set (multiple separated with | in Originate)&lt;br /&gt;
 Variable: &amp;lt;name&amp;gt;		-- For channel variables&lt;br /&gt;
 Value: &amp;lt;value&amp;gt;			-- Value to set&lt;br /&gt;
 VoiceMailbox:			-- VM Mailbox in SIPpeers&lt;br /&gt;
 Waiting:			-- Count of mailbox messages (mailboxstatus)&lt;br /&gt;
&lt;br /&gt;
 ** Please try to re-use existing headers to simplify manager message parsing in clients.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example manager.conf==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; AMI - The Asterisk Manager Interface&lt;br /&gt;
; &lt;br /&gt;
; Third party application call management support and PBX event supervision&lt;br /&gt;
;&lt;br /&gt;
; This configuration file is read every time someone logs in&lt;br /&gt;
;&lt;br /&gt;
; Use the &amp;quot;show manager commands&amp;quot; at the CLI to list available manager commands&lt;br /&gt;
; and their authorization levels.&lt;br /&gt;
;&lt;br /&gt;
; &amp;quot;show manager command &amp;lt;command&amp;gt;&amp;quot; will show a help text.&lt;br /&gt;
;&lt;br /&gt;
; ---------------------------- SECURITY NOTE -------------------------------&lt;br /&gt;
; Note that you should not enable the AMI on a public IP address. If needed,&lt;br /&gt;
; block this TCP port with iptables (or another FW software) and reach it&lt;br /&gt;
; with IPsec, SSH, or SSL vpn tunnel&lt;br /&gt;
;&lt;br /&gt;
[general]&lt;br /&gt;
enabled = no&lt;br /&gt;
port = 5038&lt;br /&gt;
bindaddr = 0.0.0.0&lt;br /&gt;
;displayconnects = yes&lt;br /&gt;
&lt;br /&gt;
;[mark]&lt;br /&gt;
;secret = mysecret&lt;br /&gt;
;deny=0.0.0.0/0.0.0.0&lt;br /&gt;
;permit=209.16.236.73/255.255.255.0&lt;br /&gt;
;&lt;br /&gt;
; If the device connected via this user accepts input slowly,&lt;br /&gt;
; the timeout for writes to it can be increased to keep it&lt;br /&gt;
; from being disconnected (value is in milliseconds)&lt;br /&gt;
;&lt;br /&gt;
; writetimeout = 100&lt;br /&gt;
;&lt;br /&gt;
; Authorization for various classes &lt;br /&gt;
;read = system,call,log,verbose,command,agent,user&lt;br /&gt;
;write = system,call,log,verbose,command,agent,user&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Mathematical</id>
		<title>Mathematical</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Mathematical"/>
				<updated>2007-09-04T13:32:42Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Yeah, I thought it was a little insane too.. &lt;br /&gt;
&lt;br /&gt;
adds:&lt;br /&gt;
&lt;br /&gt;
Sum, Multiply, Divide, Subtract, Modulus, GT, LT, GTE, LTE, EQ functions to Asterisk&lt;br /&gt;
&lt;br /&gt;
All functions follow the same basic pattern for parameters:&lt;br /&gt;
&lt;br /&gt;
parameter 1 = the math expression&lt;br /&gt;
parameter 2 = the type of result&lt;br /&gt;
&lt;br /&gt;
Perform calculation on number 1 to number 2. Valid ops are:&lt;br /&gt;
    +,-,/,*,%,&amp;lt;,&amp;gt;,&amp;gt;=,&amp;lt;=,==&lt;br /&gt;
and behave as their C equivalents.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;type_of_result&amp;gt; - wanted type of result:&lt;br /&gt;
	f, float - float(default)&lt;br /&gt;
	i, int - integer,&lt;br /&gt;
	h, hex - hex,&lt;br /&gt;
	c, char - char&lt;br /&gt;
&lt;br /&gt;
Each math expression is performed as&lt;br /&gt;
&lt;br /&gt;
 Action param1 on param2&lt;br /&gt;
&lt;br /&gt;
eg: &lt;br /&gt;
&lt;br /&gt;
 Action = Divide&lt;br /&gt;
 Param1 = 10&lt;br /&gt;
 Param2 = 2&lt;br /&gt;
&lt;br /&gt;
Results in &lt;br /&gt;
&lt;br /&gt;
 Divide 10 by 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example dialplan:&lt;br /&gt;
&lt;br /&gt;
 exten =&amp;gt; 11099,1,Set(RV=${MATH(1+20)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(10*2)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(10*2)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(10-2)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(2%10)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(10/0)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(10-200)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(1-20)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(1&amp;lt;20)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(1&amp;gt;=20)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(101&amp;gt;20)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(1==20)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(20&amp;lt;=20)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;br /&gt;
 exten =&amp;gt; 11099,n,Set(RV=${MATH(123%16,int)})&lt;br /&gt;
 exten =&amp;gt; 11099,n,NOOP(${RV})&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Logging</id>
		<title>Logging</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Logging"/>
				<updated>2007-09-04T13:32:15Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Logging Configuration&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Logging Configuration&lt;br /&gt;
;&lt;br /&gt;
; In this file, you configure logging to files or to&lt;br /&gt;
; the syslog system.&lt;br /&gt;
;&lt;br /&gt;
; &amp;quot;logger reload&amp;quot; at the CLI will reload configuration&lt;br /&gt;
; of the logging system.&lt;br /&gt;
&lt;br /&gt;
[general]&lt;br /&gt;
; Customize the display of debug message time stamps&lt;br /&gt;
; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS)&lt;br /&gt;
; see strftime(3) Linux manual for format specifiers&lt;br /&gt;
;dateformat=%F %T&lt;br /&gt;
;&lt;br /&gt;
; This appends the hostname to the name of the log files.&lt;br /&gt;
;appendhostname = yes&lt;br /&gt;
;&lt;br /&gt;
; This determines whether or not we log queue events to a file&lt;br /&gt;
; (defaults to yes).&lt;br /&gt;
;queue_log = no&lt;br /&gt;
;&lt;br /&gt;
; This determines whether or not we log generic events to a file&lt;br /&gt;
; (defaults to yes).&lt;br /&gt;
;event_log = no&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; For each file, specify what to log.&lt;br /&gt;
;&lt;br /&gt;
; For console logging, you set options at start of&lt;br /&gt;
; Asterisk with -v for verbose and -d for debug&lt;br /&gt;
; See 'asterisk -h' for more information.&lt;br /&gt;
;&lt;br /&gt;
; Directory for log files is configures in asterisk.conf&lt;br /&gt;
; option astlogdir&lt;br /&gt;
;&lt;br /&gt;
[logfiles]&lt;br /&gt;
;&lt;br /&gt;
; Format is &amp;quot;filename&amp;quot; and then &amp;quot;levels&amp;quot; of debugging to be included:&lt;br /&gt;
;    debug&lt;br /&gt;
;    notice&lt;br /&gt;
;    warning&lt;br /&gt;
;    error&lt;br /&gt;
;    verbose&lt;br /&gt;
;    dtmf&lt;br /&gt;
;&lt;br /&gt;
; Special filename &amp;quot;console&amp;quot; represents the system console&lt;br /&gt;
;&lt;br /&gt;
; We highly recommend that you DO NOT turn on debug mode if you are simply&lt;br /&gt;
; running a production system.  Debug mode turns on a LOT of extra messages,&lt;br /&gt;
; most of which you are unlikely to understand without an understanding of&lt;br /&gt;
; the underlying code.  Do NOT report debug messages as code issues, unless&lt;br /&gt;
; you have a specific issue that you are attempting to debug.  They are&lt;br /&gt;
; messages for just that -- debugging -- and do not rise to the level of&lt;br /&gt;
; something that merit your attention as an Asterisk administrator.  Debug&lt;br /&gt;
; messages are also very verbose and can and do fill up logfiles quickly;&lt;br /&gt;
; this is another reason not to have debug mode on a production system unless&lt;br /&gt;
; you are in the process of debugging a specific issue.&lt;br /&gt;
;&lt;br /&gt;
;debug =&amp;gt; debug&lt;br /&gt;
console =&amp;gt; notice,warning,error&lt;br /&gt;
;console =&amp;gt; notice,warning,error,debug&lt;br /&gt;
messages =&amp;gt; notice,warning,error&lt;br /&gt;
;full =&amp;gt; notice,warning,error,debug,verbose&lt;br /&gt;
&lt;br /&gt;
;syslog keyword : This special keyword logs to syslog facility &lt;br /&gt;
;&lt;br /&gt;
;syslog.local0 =&amp;gt; notice,warning,error&lt;br /&gt;
;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Localchannel</id>
		<title>Localchannel</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Localchannel"/>
				<updated>2007-09-04T13:31:48Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;chan_local is a pseudo-channel. Use of this channel simply loops calls back into the dialplan in a different context. Useful for recursive routing.&lt;br /&gt;
&lt;br /&gt;
* Syntax:&lt;br /&gt;
&lt;br /&gt;
 Local/extension@context[/n]&lt;br /&gt;
&lt;br /&gt;
Adding &amp;quot;/n&amp;quot; at the end of the string will make the Local channel not do a native transfer (the &amp;quot;n&amp;quot; stands for &amp;quot;n&amp;quot;o release) upon the remote end answering the line. This is an esoteric, but important feature if you expect the Local channel to handle calls exactly like a normal channel. If you do not have the &amp;quot;no release&amp;quot; feature set, then as soon as the destination (inside of the Local channel) answers the line, the variables and dial plan will revert back to that of the original call, and the Local channel will become a zombie and be removed from the active channels list. This is desirable in some circumstances, but can result in unexpected dialplan behavior if you are doing fancy things with variables in your call handling.&lt;br /&gt;
&lt;br /&gt;
* Purpose:&lt;br /&gt;
&lt;br /&gt;
The Local channel construct can be used to establish dialing into any part of the dialplan.&lt;br /&gt;
&lt;br /&gt;
Imagine you have a TE410P in your box. You want to do something for which you must use a Dial statement (for instance when dropping files in /var/spool/outgoing) but you do want to be able to use your dialplans least-cost-routes or other intelligent stuff. What you could do before we had chan_local was create a cross-link between two ports of the TE410P and then Dial out one port and in the other. This way you could control where the call was going.&lt;br /&gt;
&lt;br /&gt;
Of course, this was a nasty hack, and to make it more sensible, chan_local was built.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;Local&amp;quot; channel driver allows you to convert an arbitrary extension into a channel. It is used in a variety of places, including agents, etc.&lt;br /&gt;
&lt;br /&gt;
This also allows us to hop to contexts like a GoSub routine; See examples below.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
 [inbound] ; here falls all incoming calls&lt;br /&gt;
 exten =&amp;gt; s,1,Answer&lt;br /&gt;
 exten =&amp;gt; s,2,Dial(local/200@internal,30,r)&lt;br /&gt;
 exten =&amp;gt; s,3,Playback(sorrynoanswer)&lt;br /&gt;
 exten =&amp;gt; s,4,Hangup&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [internal] ; here where our phones falls for default&lt;br /&gt;
 exten =&amp;gt; 200,1,Dial(sip/blah)&lt;br /&gt;
 exten =&amp;gt; 200,102,VoiceMail(${EXTEN}@default)&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 exten =&amp;gt; 201,1,Dial(zap/1)&lt;br /&gt;
 exten =&amp;gt; 201,102,VoiceMail(${EXTEN}@default)&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 exten =&amp;gt; _0.,1,Dial(Zap/g1/${EXTEN:1}) ; outgoing calls with 0+number&lt;br /&gt;
&lt;br /&gt;
Caveats:&lt;br /&gt;
If you use chan_local from a call-file and you want to pass channel variables into your context, make sure you append the '/n', because otherwise chan_local will 'optimize' itself out of the call-path, and the variables will get lost. i.e.&lt;br /&gt;
&lt;br /&gt;
 Local/00531234567@pbx becomes Local/00531234567@pbx/n&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
2004-01-17&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Jitterbuffer</id>
		<title>Jitterbuffer</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Jitterbuffer"/>
				<updated>2007-09-04T13:31:17Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The new jitterbuffer, PLC, and the IAX2-integration of the new jitterbuffer have been integrated into Asterisk. The jitterbuffer is generic and work is going on to implement it in SIP/RTP as well.&lt;br /&gt;
&lt;br /&gt;
Also, we ve added a feature called &amp;quot;trunktimestamps&amp;quot;, which adds individual timestamps to trunked frames within a trunk frame.&lt;br /&gt;
&lt;br /&gt;
Here's how to use this stuff:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1) The new jitterbuffer:  &lt;br /&gt;
------------------------&lt;br /&gt;
You must add &amp;quot;jitterbuffer=yes&amp;quot; to either the [general] part of &lt;br /&gt;
iax.conf, or to a peer or a user.  (just like the old jitterbuffer).    &lt;br /&gt;
Also, you can set &amp;quot;maxjitterbuffer=n&amp;quot;, which puts a hard-limit on the size of the &lt;br /&gt;
jitterbuffer of &amp;quot;n milliseconds&amp;quot;.  It is not necessary to have the new jitterbuffer &lt;br /&gt;
on both sides of a call; it works on the receive side only.&lt;br /&gt;
&lt;br /&gt;
2) PLC:&lt;br /&gt;
-------  &lt;br /&gt;
The new jitterbuffer detects packet loss.  PLC is done to try to recreate these&lt;br /&gt;
lost packets in the codec decoding stage, as the encoded audio is translated to slinear.  &lt;br /&gt;
PLC is also used to mask jitterbuffer growth.&lt;br /&gt;
&lt;br /&gt;
This facility is enabled by default in iLBC and speex, as it has no additional cost.&lt;br /&gt;
This facility can be enabled in adpcm, alaw, g726, gsm, lpc10, and ulaw by setting &lt;br /&gt;
genericplc =&amp;gt; true in the [plc] section of codecs.conf.&lt;br /&gt;
&lt;br /&gt;
3) Trunktimestamps:&lt;br /&gt;
-------------------&lt;br /&gt;
To use this, both sides must be using Asterisk v1.2.&lt;br /&gt;
Setting &amp;quot;trunktimestamps=yes&amp;quot; in iax.conf will cause your box to send 16-bit timestamps &lt;br /&gt;
for each trunked frame inside of a trunk frame. This will enable you to use jitterbuffer&lt;br /&gt;
for an IAX2 trunk, something that was not possible in the old architecture.&lt;br /&gt;
&lt;br /&gt;
The other side must also support this functionality, or else, well, bad things will happen.  &lt;br /&gt;
If you don't use trunktimestamps, there's lots of ways the jitterbuffer can get confused because &lt;br /&gt;
timestamps aren't necessarily sent through the trunk correctly.&lt;br /&gt;
&lt;br /&gt;
4) Communication with Asterisk v1.0.x systems&lt;br /&gt;
---------------------------------------------&lt;br /&gt;
You can set up communication with v1.0.x systems with the new jitterbuffer, but&lt;br /&gt;
you can't use trunks with trunktimestamps in this communication.&lt;br /&gt;
&lt;br /&gt;
If you are connecting to an Asterisk server with earlier versions of the software (1.0.x),&lt;br /&gt;
do not enable both jitterbuffer and trunking for the involved peers/users &lt;br /&gt;
in order to be able  to communicate. Earlier systems will not support trunktimestamps.&lt;br /&gt;
&lt;br /&gt;
You may also compile chan_iax2.c without the new jitterbuffer, enabling the old &lt;br /&gt;
backwards compatible architecture. Look in the source code for instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5) Testing and monitoring:&lt;br /&gt;
--------------------------&lt;br /&gt;
You can test the effectiveness of PLC and the new jitterbuffer's detection of loss by using &lt;br /&gt;
the new CLI command &amp;quot;iax2 test losspct &amp;lt;n&amp;gt;&amp;quot;.  This will simulate n percent packet loss &lt;br /&gt;
coming _in_ to chan_iax2. You should find that with PLC and the new JB, 10 percent packet &lt;br /&gt;
loss should lead to just a tiny amount of distortion, while without PLC, it would lead to &lt;br /&gt;
silent gaps in your audio.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;iax2 show netstats&amp;quot; shows you statistics for each iax2 call you have up.  &lt;br /&gt;
The columns are &amp;quot;RTT&amp;quot; which is the round-trip time for the last PING, and then a bunch of s&lt;br /&gt;
tats for both the local side (what you're receiving), and the remote side (what the other &lt;br /&gt;
end is telling us they are seeing).  The remote stats may not be complete if the remote &lt;br /&gt;
end isn't using the new jitterbuffer.&lt;br /&gt;
&lt;br /&gt;
The stats shown are:&lt;br /&gt;
* Jit: The jitter we have measured (milliseconds)&lt;br /&gt;
* Del: The maximum delay imposed by the jitterbuffer (milliseconds)&lt;br /&gt;
* Lost: The number of packets we've detected as lost.&lt;br /&gt;
* %: The percentage of packets we've detected as lost recently.&lt;br /&gt;
* Drop: The number of packets we've purposely dropped (to lower latency).&lt;br /&gt;
* OOO: The number of packets we've received out-of-order&lt;br /&gt;
* Kpkts: The number of packets we've received / 1000.&lt;br /&gt;
&lt;br /&gt;
Reporting problems &lt;br /&gt;
==================&lt;br /&gt;
&lt;br /&gt;
There's a couple of things that can make calls sound bad using the jitterbuffer:&lt;br /&gt;
&lt;br /&gt;
1) The JB and PLC can make your calls sound better, but they can't fix everything.  &lt;br /&gt;
If you lost 10 frames in a row, it can't possibly fix that.  It really can't help much &lt;br /&gt;
more than one or two consecutive frames.&lt;br /&gt;
&lt;br /&gt;
2) Bad timestamps:  If whatever is generating timestamps to be sent to you generates &lt;br /&gt;
nonsensical timestamps, it can confuse the jitterbuffer.  In particular, discontinuities &lt;br /&gt;
in timestamps will really upset it:  Things like timestamps sequences which go 0, 20, 40, &lt;br /&gt;
60, 80,  34000, 34020, 34040, 34060...   It's going to think you've got about 34 seconds &lt;br /&gt;
of jitter in this case, etc..&lt;br /&gt;
The right solution to this is to find out what's causing the sender to send us such nonsense, &lt;br /&gt;
and fix that.  But we should also figure out how to make the receiver more robust in &lt;br /&gt;
cases like this.&lt;br /&gt;
&lt;br /&gt;
chan_iax2 will actually help fix this a bit if it's more than 3 seconds or so, but at &lt;br /&gt;
some point we should try to think of a better way to detect this kind of thing and &lt;br /&gt;
resynchronize.&lt;br /&gt;
&lt;br /&gt;
Different clock rates are handled very gracefully though; it will actually deal with a &lt;br /&gt;
sender sending 20% faster or slower than you expect just fine.&lt;br /&gt;
&lt;br /&gt;
3) Really strange network delays:  If your network &amp;quot;pauses&amp;quot; for like 5 seconds, and then &lt;br /&gt;
when it restarts, you are sent some packets that are 5 seconds old, we are going to see &lt;br /&gt;
that as a lot of jitter.   We already throw away up to the worst 20 frames like this, &lt;br /&gt;
though, and the &amp;quot;maxjitterbuffer&amp;quot; parameter should put a limit on what we do in this case.&lt;br /&gt;
&lt;br /&gt;
Reporting possible bugs&lt;br /&gt;
-----------------------&lt;br /&gt;
If you do find bad behaviors, here's the information that will help to diagnose this:&lt;br /&gt;
&lt;br /&gt;
1) Describe&lt;br /&gt;
&lt;br /&gt;
a) the source of the timestamps and frames:  i.e. if they're coming from another chan_iax2 box, &lt;br /&gt;
a bridged RTP-based channel, an IAX2 softphone, etc..&lt;br /&gt;
&lt;br /&gt;
b) The network between, in brief (i.e. the internet, a local lan, etc).&lt;br /&gt;
&lt;br /&gt;
c) What is the problem you're seeing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2) Take a look and see what iax2 show netstats is saying about the call, and if it makes sense.&lt;br /&gt;
&lt;br /&gt;
3) a tcpdump of the frames, (or, tethereal output from), so we can see the timestamps and delivery &lt;br /&gt;
times of the frames you're receiving.  You can make such a tcpdump with:&lt;br /&gt;
&lt;br /&gt;
tcpdump -s 2048 -w /tmp/example.dump udp and port 4569 [and host &amp;lt;other-end&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Report bugs in the Asterisk bugtracker, http://bugs.digium.com.&lt;br /&gt;
Please read the bug guidelines before you post a bug.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Have fun!&lt;br /&gt;
&lt;br /&gt;
-SteveK&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/IAX</id>
		<title>IAX</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/IAX"/>
				<updated>2007-09-04T13:30:21Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==INTRODUCTION==&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
This document is intended as an introduction to the Inter-Asterisk eXchange (or simply IAX) protocol.  It provides both a theoretical background and practical information on its use.&lt;br /&gt;
&lt;br /&gt;
==WHY IAX==&lt;br /&gt;
----&lt;br /&gt;
The first question most people are thinking at this point is &amp;quot;Why do you need another VoIP protocol?  Why didn't you just use SIP or H.323?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Well, the answer is a fairly complicated one, but in a nutshell it's like this...  Asterisk is intended as a very flexible and powerful communications tool.  As such, the primary feature we need from a VoIP&lt;br /&gt;
protocol is the ability to meet our own goals with Asterisk, and one with enough flexibility that we could use it as a kind of laboratory for inventing and implementing new concepts in the field.  Neither H.323 or SIP fit the roles we needed, so we developed our own protocol, which, while not standards based, provides a number of advantages over both SIP and H.323, some of which are:&lt;br /&gt;
&lt;br /&gt;
* Interoperability with NAT/PAT/Masquerade firewalls&lt;br /&gt;
::IAX seamlessly interoperates through all sorts of NAT and PAT&lt;br /&gt;
::and other firewalls, including the ability to place and receive calls, and transfer calls to other stations.&lt;br /&gt;
&lt;br /&gt;
* High performance, low overhead protocol&lt;br /&gt;
::When running on low-bandwidth connections, or when running &lt;br /&gt;
::large numbers of calls, optimized bandwidth utilization is imperative. IAX uses only 4 bytes of overhead&lt;br /&gt;
&lt;br /&gt;
* Internationalization support&lt;br /&gt;
::IAX transmits language information, so that remote PBX &lt;br /&gt;
::content can be delivered in the native language of the calling party.&lt;br /&gt;
&lt;br /&gt;
* Remote dialplan polling&lt;br /&gt;
::IAX allows a PBX or IP phone to poll the availability of a &lt;br /&gt;
::number from a remote server.  This allows PBX dialplans to be centralized.&lt;br /&gt;
&lt;br /&gt;
* Flexible authentication&lt;br /&gt;
::IAX supports cleartext, md5, and RSA authentication, &lt;br /&gt;
::providing flexible security models for outgoing calls and registration services.&lt;br /&gt;
	&lt;br /&gt;
* Multimedia protocol&lt;br /&gt;
::IAX supports the transmission of voice, video, images, text, &lt;br /&gt;
::HTML, DTMF, and URL's.  Voice menus can be presented in both audibly and visually.&lt;br /&gt;
&lt;br /&gt;
* Call statistic gathering&lt;br /&gt;
::IAX gathers statistics about network performance (including &lt;br /&gt;
::latency and jitter, as well as providing end-to-end latency measurement.&lt;br /&gt;
&lt;br /&gt;
* Call parameter communication&lt;br /&gt;
::Caller*ID, requested extension, requested context, etc are all communicated through the call.&lt;br /&gt;
&lt;br /&gt;
* Single socket design&lt;br /&gt;
::IAX's single socket design allows up to 32768 calls to be multiplexed.&lt;br /&gt;
	&lt;br /&gt;
While we value the importance of standards based (i.e. SIP) call handling, &lt;br /&gt;
hopefully this will provide a reasonable explanation of why we developed &lt;br /&gt;
IAX rather than starting with SIP.&lt;br /&gt;
&lt;br /&gt;
==CONFIG FILE CONVENTIONS==&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lines beginning with '&amp;gt;' represent lines which might appear in an actual &lt;br /&gt;
configuration file.  The '&amp;gt;' is used to help separate them from the &lt;br /&gt;
descriptive text and should not actually be included in the file itself.&lt;br /&gt;
&lt;br /&gt;
Lines within []'s by themselves represent section labels within the &lt;br /&gt;
configuration file.  like this:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; [mysection]&lt;br /&gt;
&lt;br /&gt;
Options are set using the &amp;quot;=&amp;quot; sign, for example&lt;br /&gt;
&lt;br /&gt;
&amp;gt; myoption = value&lt;br /&gt;
&lt;br /&gt;
Sometimes an option will have a number of discrete values which it can &lt;br /&gt;
take.  In that case, in the documentation, the options will be listed &lt;br /&gt;
within square brackets (the &amp;quot;[&amp;quot; and &amp;quot;]&amp;quot; ones) separated by the pipe symbol &lt;br /&gt;
(&amp;quot;|&amp;quot;).  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; myoption = [value1|value2|value3]&lt;br /&gt;
&lt;br /&gt;
means the option &amp;quot;myoption&amp;quot; can be assigned a value of &amp;quot;value1&amp;quot;, &amp;quot;value2&amp;quot;, &lt;br /&gt;
or &amp;quot;value3&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Objects, or pseudo-objects are instantiated using the &amp;quot;=&amp;gt;&amp;quot; construct.  For &lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; myobject =&amp;gt; parameter&lt;br /&gt;
&lt;br /&gt;
creates an object called &amp;quot;myobject&amp;quot; with some parameter whose definition&lt;br /&gt;
would be specific to that object.  Note that the config file parser&lt;br /&gt;
considers &amp;quot;=&amp;gt;&amp;quot; and &amp;quot;=&amp;quot; to be equivalent and their use is purely to make&lt;br /&gt;
configuration files more readable and easier to &amp;quot;humanly parse&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The comment character in Asterisk configuration files is the semicolon &lt;br /&gt;
&amp;quot;;&amp;quot;.  The reason it is not &amp;quot;#&amp;quot; is because the &amp;quot;#&amp;quot; symbol can be used as &lt;br /&gt;
parts of extensions and it didn't seem like a good idea to have to escape &lt;br /&gt;
it.&lt;br /&gt;
&lt;br /&gt;
==IAX CONFIGURATION IN ASTERISK==&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
Like everything else in Asterisk, IAX's configuration lies in &lt;br /&gt;
/etc/asterisk -- specifically /etc/asterisk/iax.conf&lt;br /&gt;
&lt;br /&gt;
The IAX configuration file is a collection of sections, each of which&lt;br /&gt;
(with the exception of the &amp;quot;general&amp;quot; section) represents an entity within &lt;br /&gt;
the IAX scope.&lt;br /&gt;
&lt;br /&gt;
------------&lt;br /&gt;
&lt;br /&gt;
The first section is typically the &amp;quot;general&amp;quot; section.  In this area, &lt;br /&gt;
a number of parameters which affect the entire system are configured.  &lt;br /&gt;
Specifically, the default codecs, port and address, jitter behavior, TOS &lt;br /&gt;
bits, and registrations.&lt;br /&gt;
&lt;br /&gt;
The first line of the &amp;quot;general&amp;quot; section is always:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; [general]&lt;br /&gt;
&lt;br /&gt;
Following the first line are a number of other possibilities:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; bindport = &amp;lt;portnum&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets the port that IAX will bind to.  The default IAX version 1 &lt;br /&gt;
port number is 5036.  For IAX version 2, that is now the default in&lt;br /&gt;
Asterisk, the default port is 4569.&lt;br /&gt;
It is recommended that this value not be altered in general.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; bindaddr = &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This allows you to bind IAX to a specific local IP address instead of&lt;br /&gt;
binding to all addresses.  This could be used to enhance security if, for&lt;br /&gt;
example, you only wanted IAX to be available to users on your LAN.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; bandwidth = [low|medium|high]&lt;br /&gt;
&lt;br /&gt;
The bandwidth selection initializes the codec selection to appropriate&lt;br /&gt;
values for given bandwidths.  The &amp;quot;high&amp;quot; selection enables all codecs and&lt;br /&gt;
is recommended only for 10Mbps or higher connections.  The &amp;quot;medium&amp;quot;&lt;br /&gt;
bandwidth eliminates signed linear, Mu-law and A-law codecs, leaving only&lt;br /&gt;
the codecs which are 32kbps and smaller (with MP3 as a special case).  It&lt;br /&gt;
can be used with broadband connections if desired. &amp;quot;low&amp;quot; eliminates ADPCM&lt;br /&gt;
and MP3 formats, leaving only the G.723.1, GSM, and LPC10.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; allow = [gsm|lpc10|g723.1|adpcm|ulaw|alaw|mp3|slinear|all]&lt;br /&gt;
&amp;gt; disallow = [gsm|lpc10|g723.1|adpcm|ulaw|alaw|mp3|slinear|all]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;allow&amp;quot; and &amp;quot;disallow&amp;quot; allow you to fine tune the codec selection &lt;br /&gt;
beyond the initial bandwidth selection on a codec-by-codec basis.  &lt;br /&gt;
&lt;br /&gt;
The recommended configuration is to select &amp;quot;low&amp;quot; bandwidth and then &lt;br /&gt;
disallow the LPC10 codec just because it doesn't sound very good. &lt;br /&gt;
&lt;br /&gt;
&amp;gt; jitterbuffer = [yes|no]&lt;br /&gt;
&amp;gt; dropcount = &amp;lt;dropamount&amp;gt;&lt;br /&gt;
&amp;gt; maxjitterbuffer = &amp;lt;max&amp;gt;&lt;br /&gt;
&amp;gt; maxexcessbuffer = &amp;lt;max&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These parameters control the operation of the jitter buffer.  The &lt;br /&gt;
jitterbuffer should always be enabled unless you expect all your &lt;br /&gt;
connections to be over a LAN.  &lt;br /&gt;
* drop count is the maximum number of voice packets to allow to drop &lt;br /&gt;
  (out of 100).  Useful values are 3-10.  &lt;br /&gt;
* maxjitterbuffer is the maximum amount of jitter buffer to permit to be &lt;br /&gt;
  used.  &lt;br /&gt;
* maxexcessbuffer is the maximum amount of excess jitter buffer &lt;br /&gt;
  that is permitted before the jitter buffer is slowly shrunk to eliminate &lt;br /&gt;
  latency.&lt;br /&gt;
* minexcessbuffer is the minimum amout of excess jitter buffer&lt;br /&gt;
&lt;br /&gt;
&amp;gt; accountcode = &amp;lt;code&amp;gt;&lt;br /&gt;
&amp;gt; amaflags = [default|omit|billing|documentation]&lt;br /&gt;
&lt;br /&gt;
These parameters affect call detail record generation.  The first sets the &lt;br /&gt;
account code for records received with IAX.  The account code can be &lt;br /&gt;
overridden on a per-user basis for incoming calls (see below).  The &lt;br /&gt;
amaflags controls how the record is labeled (&amp;quot;omit&amp;quot; causes no record to be &lt;br /&gt;
written.  &amp;quot;billing&amp;quot; and &amp;quot;documentation&amp;quot; label the records as billing or &lt;br /&gt;
documentation records respectively, and &amp;quot;default&amp;quot; selects the system &lt;br /&gt;
default.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; tos = [lowdelay|throughput|reliability|mincost|none]&lt;br /&gt;
&lt;br /&gt;
IAX can optionally set the TOS (Type of Service) bits to specified values &lt;br /&gt;
to help improve performance in routing.  The recommended value is &lt;br /&gt;
&amp;quot;lowdelay&amp;quot;, which many routers (including any Linux routers with 2.4 &lt;br /&gt;
kernels that have not been altered with ip tables) will give priority to &lt;br /&gt;
these packets, improving voice quality.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; register =&amp;gt; &amp;lt;name&amp;gt;[:&amp;lt;secret&amp;gt;]@&amp;lt;host&amp;gt;[:port]&lt;br /&gt;
&lt;br /&gt;
Any number of registry entries may be instantiated in the general &lt;br /&gt;
section.  Registration allows Asterisk to notify a remote Asterisk server &lt;br /&gt;
(with a fixed address) what our current address is.  In order for &lt;br /&gt;
registration to work, the remote Asterisk server will need to have a &lt;br /&gt;
dynamic peer entry with the same name (and secret if provided).  &lt;br /&gt;
&lt;br /&gt;
The name is a required field, and is the remote peer name that we wish to &lt;br /&gt;
identify ourselves as.  A secret may be provided as well.  The secret is &lt;br /&gt;
generally a shared password between the local server and the remote &lt;br /&gt;
server.  However, if the secret is in square brackets ([]'s) then it is &lt;br /&gt;
interpreted as the name of a RSA key to use.  In that case, the local Asterisk &lt;br /&gt;
server must have the *private* key (/var/lib/asterisk/keys/&amp;lt;name&amp;gt;.key) and &lt;br /&gt;
the remote server will have to have the corresponding public key.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;host&amp;quot; is a required field and is the hostname or IP address of the &lt;br /&gt;
remote Asterisk server.  The port specification is optional and is by &lt;br /&gt;
default 4569 for iax2 if not specified.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; notransfer = yes | no&lt;br /&gt;
&lt;br /&gt;
If an IAX phone calls another IAX phone by using a Asterisk server, &lt;br /&gt;
Asterisk will transfer the call to go peer to peer. If you do not&lt;br /&gt;
want this, turn on notransfer with a &amp;quot;yes&amp;quot;. This is also settable&lt;br /&gt;
for peers and users.&lt;br /&gt;
&lt;br /&gt;
-------------&lt;br /&gt;
&lt;br /&gt;
The following sections, after &amp;quot;general&amp;quot; define either users, peers or&lt;br /&gt;
friends.  A &amp;quot;user&amp;quot; is someone who connects to us.  A &amp;quot;peer&amp;quot; is someone&lt;br /&gt;
that we connect to.  A &amp;quot;friend&amp;quot; is simply shorthand for creating a &amp;quot;user&amp;quot; &lt;br /&gt;
and &amp;quot;peer&amp;quot; with identical parameters (i.e. someone who can contact us and &lt;br /&gt;
who we contact). &lt;br /&gt;
&lt;br /&gt;
&amp;gt; [identifier]&lt;br /&gt;
&lt;br /&gt;
The section begins with the identifier in square brackets.  The identifier &lt;br /&gt;
should be an alphanumeric string.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; type = [user|peer|friend]&lt;br /&gt;
&lt;br /&gt;
This line tells Asterisk how to interpret this entity.  Users are things &lt;br /&gt;
that connect to us, while peers are phones we connect to, and a friend is &lt;br /&gt;
shorthand for creating a user and a peer with identical information&lt;br /&gt;
&lt;br /&gt;
----------------&lt;br /&gt;
User fields:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; context = &amp;lt;context&amp;gt;&lt;br /&gt;
&lt;br /&gt;
One or more context lines may be specified in a user, thus giving the user &lt;br /&gt;
access to place calls in the given contexts.  Contexts are used by &lt;br /&gt;
Asterisk to divide dialing plans into logical units each with the ability &lt;br /&gt;
to have numbers interpreted differently, have their own security model, &lt;br /&gt;
auxiliary switch handling, and include other contexts.  Most users are &lt;br /&gt;
given access to the default context.  Trusted users could be given access &lt;br /&gt;
to the local context for example.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; permit = &amp;lt;ipaddr&amp;gt;/&amp;lt;netmask&amp;gt;&lt;br /&gt;
&amp;gt; deny = &amp;lt;ipaddr&amp;gt;/&amp;lt;netmask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Permit and deny rules may be applied to users, allowing them to connect &lt;br /&gt;
from certain IP addresses and not others.  The permit and deny rules are &lt;br /&gt;
interpreted in sequence and all are evaluated on a given IP address, with &lt;br /&gt;
the final result being the decision.  For example:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; permit = 0.0.0.0/0.0.0.0&lt;br /&gt;
&amp;gt; deny = 192.168.0.0/255.255.255.0&lt;br /&gt;
&lt;br /&gt;
would deny anyone in 192.168.0.0 with a netmask of 24 bits (class C), &lt;br /&gt;
whereas:&lt;br /&gt;
&lt;br /&gt;
&amp;gt; deny = 192.168.0.0/24&lt;br /&gt;
&amp;gt; permit = 0.0.0.0/0&lt;br /&gt;
&lt;br /&gt;
would not deny anyone since the final rule would permit anyone, thus &lt;br /&gt;
overriding the denial.  &lt;br /&gt;
&lt;br /&gt;
If no permit/deny rules are listed, it is assumed that someone may connect &lt;br /&gt;
from anywhere.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; callerid = &amp;lt;callerid&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may override the Caller*ID information passed by a user to you (if &lt;br /&gt;
they choose to send it) in order that it always be accurate from the &lt;br /&gt;
perspective of your server.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; auth = [md5|plaintext|rsa]&lt;br /&gt;
&lt;br /&gt;
You may select which authentication methods are permitted to be used by &lt;br /&gt;
the user to authenticate to us.  Multiple methods may be specified, &lt;br /&gt;
separated by commas. If md5 or plaintext authentication is selected, a &lt;br /&gt;
secret must be provided. If RSA authentication is specified, then one or &lt;br /&gt;
more key names must be specified with &amp;quot;inkeys&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If no secret is specified and no authentication method is specified, then &lt;br /&gt;
no authentication will be required.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; secret = &amp;lt;secret&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;secret&amp;quot; line specifies the shared secret for md5 and plaintext &lt;br /&gt;
authentication methods.  It is never suggested to use plaintext except in &lt;br /&gt;
some cases for debugging.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; inkeys = key1[:key2...]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;inkeys&amp;quot; line specifies which keys we can use to authenticate the &lt;br /&gt;
remote peer.  If the peer's challenge passes with any of the given keys, &lt;br /&gt;
then we accept its authentication.  The key files live in &lt;br /&gt;
/var/lib/asterisk/keys/&amp;lt;name&amp;gt;.pub and are *public keys*.  Public keys are &lt;br /&gt;
not typically DES3 encrypted and thus do not usually need initialization.&lt;br /&gt;
&lt;br /&gt;
---------------&lt;br /&gt;
Peer configuration&lt;br /&gt;
&lt;br /&gt;
&amp;gt; allow = [gsm|lpc10|g723.1|adpcm|ulaw|alaw|mp3|slinear|all]&lt;br /&gt;
&amp;gt; disallow = [gsm|lpc10|g723.1|adpcm|ulaw|alaw|mp3|slinear|all]&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;allow&amp;quot; and &amp;quot;disallow&amp;quot; may be used to enable or disable specific codec &lt;br /&gt;
support on a per-peer basis.  &lt;br /&gt;
&lt;br /&gt;
&amp;gt; host = [&amp;lt;ipaddr&amp;gt;|dynamic]&lt;br /&gt;
&lt;br /&gt;
The host line specifies the hostname or IP address of the remote host, or &lt;br /&gt;
may be the word &amp;quot;dynamic&amp;quot; signifying that the host will register with us &lt;br /&gt;
(see register =&amp;gt; in the general section above).&lt;br /&gt;
&lt;br /&gt;
&amp;gt; defaultip = &amp;lt;ipaddr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the host uses dynamic registration, Asterisk may still be given a &lt;br /&gt;
default IP address to use when dynamic registration has not been performed &lt;br /&gt;
or has timed out.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; peercontext = &amp;lt;context&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Specifies the context name to be passed to the peer for it to use when routing&lt;br /&gt;
the call through its dial plan. This entry will be used only if a context&lt;br /&gt;
is not included in the IAX2 channel name passed to the Dial command.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; qualify = [yes | no | &amp;lt;value&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Qualify turns on checking of availability of the remote peer. If the &lt;br /&gt;
peer becomes unavailable, no calls are placed to the peer until&lt;br /&gt;
it is reachable again. This is also helpful in certain NAT situations.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; jitterbuffer = [yes | no]&lt;br /&gt;
&lt;br /&gt;
Turns on or off the jitterbuffer for this peer&lt;br /&gt;
&lt;br /&gt;
&amp;gt; mailbox = &amp;lt;mailbox&amp;gt;[@mailboxcontext]&lt;br /&gt;
&lt;br /&gt;
Specifies a mailbox to check for voicemail notification.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; permit = &amp;lt;ipaddr&amp;gt;/&amp;lt;netmask&amp;gt;&lt;br /&gt;
&amp;gt; deny = &amp;lt;ipaddr&amp;gt;/&amp;lt;netmask&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Permit and deny rules may be applied to users, allowing them to connect &lt;br /&gt;
from certain IP addresses and not others.  The permit and deny rules are &lt;br /&gt;
interpreted in sequence and all are evaluated on a given IP address, with &lt;br /&gt;
the final result being the decision.  See the user section above &lt;br /&gt;
for examples.&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
For more examples of a configuration, please see the iax.conf.sample in&lt;br /&gt;
your the /configs directory of you source code distribution&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
The format for the dialing string on Asterisk is: '''IAX/[user@]peer[:exten[@context]]'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
(Note, []'s denote optional fields).&lt;br /&gt;
&lt;br /&gt;
The peer is either an IP address or a peer as specified in the /etc/asterisk/iax.conf file. Exten is an optional requested extension (otherwise &amp;quot;s&amp;quot; will be used), and  &amp;quot;context&amp;quot; is an optional context to request.  The user is an optional username specified in the peer's iax.conf.  If the user is not specified, the peer will select one.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Protocol and rationale:&lt;br /&gt;
----&lt;br /&gt;
IAX is a simple, low overhead and low bandwidth VoIP protocol designed to  allow multiple Asterisk PBX's to communicate with one another without the overhead of more complex protocols like H.323.  Payload is sent with a header overhead of only 4 octets.  Control functions (and one payload packet per minute or so) is sent with a more complex header of 12 octets.&lt;br /&gt;
&lt;br /&gt;
IAX is slightly stateful.&lt;br /&gt;
&lt;br /&gt;
IAX contains two kinds of packets:  The full header packet type, which contains much information about the frame, in addition to its contents, and the mini header type, which is used only for non-reliable voice packet delivery.&lt;br /&gt;
&lt;br /&gt;
All packets are immediately transmitted.  Packets are received, but not delivered to the actual channels until a given time quantum has passed, in order to try to eliminate jitter.&lt;br /&gt;
&lt;br /&gt;
All full header packets must be ackd (except, obviously for the ACK packets themselves and not so obviously for hangup packets).  The &amp;quot;timestamp&amp;quot; field of ack packets is not the normal offset, but rather a quote of the timestamp as included with the original packet that you're acking, and likewise the seqno field is the seqno of the packet you're acking, not your own seqno, and you do not increment your own sequence number.  ACKing is based on the sequence number.&lt;br /&gt;
&lt;br /&gt;
See iax.h for a description of the frame formats. &lt;br /&gt;
&lt;br /&gt;
IAX internal frames use the AST_FRAME_IAX type.  The subclass of these frames is the IAX control number, as seen in iax.h.  The first frame sent must be an AST_FRAME_IAX with the control AST_IAX_CONTROL_NEW.&lt;br /&gt;
&lt;br /&gt;
The AST_IAX_CONTROL_NEW establishes a new connection.  &lt;br /&gt;
&lt;br /&gt;
The first frame sent MUST be an AST_CONTROL_NEW to start a connection.&lt;br /&gt;
&lt;br /&gt;
IAX connnections may require authentication using either simple plaintext passwords or an md5 challenge/response pair.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example iax.conf==&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
; Inter-Asterisk eXchange driver definition&lt;br /&gt;
;&lt;br /&gt;
; This configuration is re-read at reload&lt;br /&gt;
; or with the CLI command&lt;br /&gt;
; 	reload chan_iax2.so&lt;br /&gt;
;&lt;br /&gt;
; General settings, like port number to bind to, and&lt;br /&gt;
; an option address (the default is to bind to all&lt;br /&gt;
; local addresses).&lt;br /&gt;
;&lt;br /&gt;
[general]&lt;br /&gt;
;bindport=4569			; bindport and bindaddr may be specified&lt;br /&gt;
;                               ; NOTE: bindport must be specified BEFORE bindaddr&lt;br /&gt;
;                               ; or may be specified on a specific bindaddr if followed by&lt;br /&gt;
;                               ; colon and port (e.g. bindaddr=192.168.0.1:4569)&lt;br /&gt;
;bindaddr=192.168.0.1		; more than once to bind to multiple&lt;br /&gt;
;                               ; addresses, but the first will be the &lt;br /&gt;
;                               ; default&lt;br /&gt;
;&lt;br /&gt;
; Set iaxcompat to yes if you plan to use layered switches or&lt;br /&gt;
; some other scenario which may cause some delay when doing a&lt;br /&gt;
; lookup in the dialplan. It incurs a small performance hit to&lt;br /&gt;
; enable it. This option causes Asterisk to spawn a separate thread&lt;br /&gt;
; when it receives an IAX DPREQ (Dialplan Request) instead of&lt;br /&gt;
; blocking while it waits for a response.&lt;br /&gt;
;&lt;br /&gt;
;iaxcompat=yes&lt;br /&gt;
;&lt;br /&gt;
; Disable UDP checksums (if nochecksums is set, then no checkums will&lt;br /&gt;
; be calculated/checked on systems supporting this feature)&lt;br /&gt;
;&lt;br /&gt;
;nochecksums=no&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; For increased security against brute force password attacks&lt;br /&gt;
; enable &amp;quot;delayreject&amp;quot; which will delay the sending of authentication&lt;br /&gt;
; reject for REGREQ or AUTHREP if there is a password.  &lt;br /&gt;
;&lt;br /&gt;
;delayreject=yes&lt;br /&gt;
;&lt;br /&gt;
; You may specify a global default AMA flag for iaxtel calls.  It must be&lt;br /&gt;
; one of 'default', 'omit', 'billing', or 'documentation'.  These flags&lt;br /&gt;
; are used in the generation of call detail records.&lt;br /&gt;
;&lt;br /&gt;
;amaflags=default&lt;br /&gt;
;&lt;br /&gt;
; You may specify a default account for Call Detail Records in addition&lt;br /&gt;
; to specifying on a per-user basis&lt;br /&gt;
;&lt;br /&gt;
;accountcode=lss0101&lt;br /&gt;
;&lt;br /&gt;
; You may specify a global default language for users. &lt;br /&gt;
; Can be specified also on a per-user basis&lt;br /&gt;
; If omitted, will fallback to english&lt;br /&gt;
;&lt;br /&gt;
;language=en&lt;br /&gt;
;&lt;br /&gt;
; Specify bandwidth of low, medium, or high to control which codecs are used&lt;br /&gt;
; in general.&lt;br /&gt;
;&lt;br /&gt;
bandwidth=low&lt;br /&gt;
;&lt;br /&gt;
; You can also fine tune codecs here using &amp;quot;allow&amp;quot; and &amp;quot;disallow&amp;quot; clauses&lt;br /&gt;
; with specific codecs.  Use &amp;quot;all&amp;quot; to represent all formats.&lt;br /&gt;
;&lt;br /&gt;
;allow=all			; same as bandwidth=high&lt;br /&gt;
;disallow=g723.1		; Hm...  Proprietary, don't use it...&lt;br /&gt;
disallow=lpc10			; Icky sound quality...  Mr. Roboto.&lt;br /&gt;
;allow=gsm			; Always allow GSM, it's cool :)&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
; You can adjust several parameters relating to the jitter buffer.&lt;br /&gt;
; The jitter buffer's function is to compensate for varying&lt;br /&gt;
; network delay.&lt;br /&gt;
;&lt;br /&gt;
; There are presently two jitterbuffer implementations available for Asterisk&lt;br /&gt;
; and chan_iax2; the classic and the new, channel/application independent&lt;br /&gt;
; implementation.  These are controlled at compile-time.  The new jitterbuffer&lt;br /&gt;
; additionally has support for PLC which greatly improves quality as the&lt;br /&gt;
; jitterbuffer adapts size, and in compensating for lost packets.&lt;br /&gt;
;&lt;br /&gt;
; All the jitter buffer settings except dropcount are in milliseconds.&lt;br /&gt;
; The jitter buffer works for INCOMING audio - the outbound audio&lt;br /&gt;
; will be dejittered by the jitter buffer at the other end.&lt;br /&gt;
;&lt;br /&gt;
; jitterbuffer=yes|no: global default as to whether you want&lt;br /&gt;
; the jitter buffer at all.&lt;br /&gt;
;&lt;br /&gt;
; forcejitterbuffer=yes|no: in the ideal world, when we bridge VoIP channels&lt;br /&gt;
; we don't want to do jitterbuffering on the switch, since the endpoints&lt;br /&gt;
; can each handle this.  However, some endpoints may have poor jitterbuffers &lt;br /&gt;
; themselves, so this option will force * to always jitterbuffer, even in this&lt;br /&gt;
; case.&lt;br /&gt;
; [This option presently applies only to the new jitterbuffer implementation]&lt;br /&gt;
;&lt;br /&gt;
; dropcount: the jitter buffer is sized such that no more than &amp;quot;dropcount&amp;quot;&lt;br /&gt;
; frames would have been &amp;quot;too late&amp;quot; over the last 2 seconds.&lt;br /&gt;
; Set to a small number.  &amp;quot;3&amp;quot; represents 1.5% of frames dropped&lt;br /&gt;
; [This option is not applicable to, and ignored by the new jitterbuffer implementation]&lt;br /&gt;
;&lt;br /&gt;
; maxjitterbuffer: a maximum size for the jitter buffer.&lt;br /&gt;
; Setting a reasonable maximum here will prevent the call delay&lt;br /&gt;
; from rising to silly values in extreme situations; you'll hear&lt;br /&gt;
; SOMETHING, even though it will be jittery.&lt;br /&gt;
;&lt;br /&gt;
; resyncthreshold: when the jitterbuffer notices a significant change in delay&lt;br /&gt;
; that continues over a few frames, it will resync, assuming that the change in&lt;br /&gt;
; delay was caused by a timestamping mix-up. The threshold for noticing a&lt;br /&gt;
; change in delay is measured as twice the measured jitter plus this resync&lt;br /&gt;
; threshold.&lt;br /&gt;
; Resyncing can be disabled by setting this parameter to -1.&lt;br /&gt;
; [This option presently applies only to the new jitterbuffer implementation]&lt;br /&gt;
;&lt;br /&gt;
; maxjitterinterps: the maximum number of interpolation frames the jitterbuffer&lt;br /&gt;
; should return in a row. Since some clients do not send CNG/DTX frames to&lt;br /&gt;
; indicate silence, the jitterbuffer will assume silence has begun after&lt;br /&gt;
; returning this many interpolations. This prevents interpolating throughout&lt;br /&gt;
; a long silence.&lt;br /&gt;
; [This option presently applies only to the new jitterbuffer implementation]&lt;br /&gt;
;&lt;br /&gt;
; maxexcessbuffer: If conditions improve after a period of high jitter,&lt;br /&gt;
; the jitter buffer can end up bigger than necessary.  If it ends up&lt;br /&gt;
; more than &amp;quot;maxexcessbuffer&amp;quot; bigger than needed, Asterisk will start&lt;br /&gt;
; gradually decreasing the amount of jitter buffering.&lt;br /&gt;
; [This option is not applicable to, and ignored by the new jitterbuffer implementation]&lt;br /&gt;
;&lt;br /&gt;
; minexcessbuffer: Sets a desired mimimum amount of headroom in &lt;br /&gt;
; the jitter buffer.  If Asterisk has less headroom than this, then&lt;br /&gt;
; it will start gradually increasing the amount of jitter buffering.&lt;br /&gt;
; [This option is not applicable to, and ignored by the new jitterbuffer implementation]&lt;br /&gt;
;&lt;br /&gt;
; jittershrinkrate: when the jitter buffer is being gradually shrunk &lt;br /&gt;
; (or enlarged), how many millisecs shall we take off per 20ms frame&lt;br /&gt;
; received?  Use a small number, or you will be able to hear it&lt;br /&gt;
; changing.  An example: if you set this to 2, then the jitter buffer&lt;br /&gt;
; size will change by 100 millisecs per second.&lt;br /&gt;
; [This option is not applicable to, and ignored by the new jitterbuffer implementation]&lt;br /&gt;
&lt;br /&gt;
jitterbuffer=no&lt;br /&gt;
forcejitterbuffer=no&lt;br /&gt;
;dropcount=2&lt;br /&gt;
;maxjitterbuffer=1000&lt;br /&gt;
;maxjitterinterps=10&lt;br /&gt;
;resyncthreshold=1000&lt;br /&gt;
;maxexcessbuffer=80&lt;br /&gt;
;minexcessbuffer=10&lt;br /&gt;
;jittershrinkrate=1&lt;br /&gt;
&lt;br /&gt;
;trunkfreq=20			; How frequently to send trunk msgs (in ms)&lt;br /&gt;
&lt;br /&gt;
; Should we send timestamps for the individual sub-frames within trunk frames?&lt;br /&gt;
; There is a small bandwidth use for these (less than 1kbps/call), but they&lt;br /&gt;
; ensure that frame timestamps get sent end-to-end properly.  If both ends of&lt;br /&gt;
; all your trunks go directly to TDM, _and_ your trunkfreq equals the frame&lt;br /&gt;
; length for your codecs, you can probably suppress these.  The receiver must&lt;br /&gt;
; also support this feature, although they do not also need to have it enabled.&lt;br /&gt;
;&lt;br /&gt;
; trunktimestamps=yes&lt;br /&gt;
;&lt;br /&gt;
; Minimum and maximum amounts of time that IAX peers can request as&lt;br /&gt;
; a registration expiration interval (in seconds).&lt;br /&gt;
; minregexpire = 60&lt;br /&gt;
; maxregexpire = 60&lt;br /&gt;
;&lt;br /&gt;
; We can register with another IAX server to let him know where we are&lt;br /&gt;
; in case we have a dynamic IP address for example&lt;br /&gt;
;&lt;br /&gt;
; Register with tormenta using username marko and password secretpass&lt;br /&gt;
;&lt;br /&gt;
;register =&amp;gt; marko:secretpass@tormenta.linux-support.net&lt;br /&gt;
;&lt;br /&gt;
; Register joe at remote host with no password&lt;br /&gt;
;&lt;br /&gt;
;register =&amp;gt; joe@remotehost:5656&lt;br /&gt;
;&lt;br /&gt;
; Register marko at tormenta.linux-support.net using RSA key &amp;quot;torkey&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
;register =&amp;gt; marko:[torkey]@tormenta.linux-support.net&lt;br /&gt;
;&lt;br /&gt;
; Sample Registration for iaxtel&lt;br /&gt;
;&lt;br /&gt;
; Visit http://www.iaxtel.com to register with iaxtel.  Replace &amp;quot;user&amp;quot;&lt;br /&gt;
; and &amp;quot;pass&amp;quot; with your username and password for iaxtel.  Incoming &lt;br /&gt;
; calls arrive at the &amp;quot;s&amp;quot; extension of &amp;quot;default&amp;quot; context.&lt;br /&gt;
;&lt;br /&gt;
;register =&amp;gt; user:pass@iaxtel.com&lt;br /&gt;
;&lt;br /&gt;
; Sample Registration for IAX + FWD&lt;br /&gt;
;&lt;br /&gt;
; To register using IAX with FWD, it must be enabled by visiting the URL&lt;br /&gt;
; http://www.fwdnet.net/index.php?section_id=112&lt;br /&gt;
;&lt;br /&gt;
; Note that you need an extension in you default context which matches&lt;br /&gt;
; your free world dialup number.  Please replace &amp;quot;FWDNumber&amp;quot; with your&lt;br /&gt;
; FWD number and &amp;quot;passwd&amp;quot; with your password.&lt;br /&gt;
;&lt;br /&gt;
;register =&amp;gt; FWDNumber:passwd@iax.fwdnet.net&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; You can disable authentication debugging to reduce the amount of &lt;br /&gt;
; debugging traffic.&lt;br /&gt;
;&lt;br /&gt;
;authdebug=no&lt;br /&gt;
;&lt;br /&gt;
; Finally, you can set values for your TOS bits to help improve &lt;br /&gt;
; performance.  Valid values are:&lt;br /&gt;
;   lowdelay		-- Minimize delay&lt;br /&gt;
;   throughput		-- Maximize throughput&lt;br /&gt;
;   reliability		-- Maximize reliability&lt;br /&gt;
;   mincost		-- Minimize cost&lt;br /&gt;
;   none		-- No flags&lt;br /&gt;
;&lt;br /&gt;
tos=lowdelay&lt;br /&gt;
;&lt;br /&gt;
; If mailboxdetail is set to &amp;quot;yes&amp;quot;, the user receives&lt;br /&gt;
; the actual new/old message counts, not just a yes/no&lt;br /&gt;
; as to whether they have messages.  this can be set on&lt;br /&gt;
; a per-peer basis as well&lt;br /&gt;
;&lt;br /&gt;
;mailboxdetail=yes&lt;br /&gt;
;&lt;br /&gt;
; If regcontext is specified, Asterisk will dynamically create and destroy&lt;br /&gt;
; a NoOp priority 1 extension for a given peer who registers or unregisters&lt;br /&gt;
; with us.  The actual extension is the 'regexten' parameter of the registering&lt;br /&gt;
; peer or its name if 'regexten' is not provided.  More than one regexten&lt;br /&gt;
; may be supplied if they are separated by '&amp;amp;'.  Patterns may be used in&lt;br /&gt;
; regexten.&lt;br /&gt;
;&lt;br /&gt;
;regcontext=iaxregistrations&lt;br /&gt;
;&lt;br /&gt;
; If we don't get ACK to our NEW within 2000ms, and autokill is set to yes,&lt;br /&gt;
; then we cancel the whole thing (that's enough time for one retransmission&lt;br /&gt;
; only).  This is used to keep things from stalling for a long time for a host&lt;br /&gt;
; that is not available, but would be ill advised for bad connections.  In&lt;br /&gt;
; addition to 'yes' or 'no' you can also specify a number of milliseconds.&lt;br /&gt;
; See 'qualify' for individual peers to turn on for just a specific peer.&lt;br /&gt;
;&lt;br /&gt;
autokill=yes&lt;br /&gt;
;&lt;br /&gt;
; codecpriority controls the codec negotiation of an inbound IAX call.&lt;br /&gt;
; This option is inherited to all user entities.  It can also be defined &lt;br /&gt;
; in each user entity separately which will override the setting in general.&lt;br /&gt;
;&lt;br /&gt;
; The valid values are:&lt;br /&gt;
;&lt;br /&gt;
; caller   - Consider the callers preferred order ahead of the host's.&lt;br /&gt;
; host     - Consider the host's preferred order ahead of the caller's.&lt;br /&gt;
; disabled - Disable the consideration of codec preference altogether.&lt;br /&gt;
;            (this is the original behaviour before preferences were added)&lt;br /&gt;
; reqonly  - Same as disabled, only do not consider capabilities if&lt;br /&gt;
;            the requested format is not available the call will only&lt;br /&gt;
;            be accepted if the requested format is available.&lt;br /&gt;
;&lt;br /&gt;
; The default value is 'host'&lt;br /&gt;
;&lt;br /&gt;
;codecpriority=host&lt;br /&gt;
&lt;br /&gt;
;rtcachefriends=yes		; Cache realtime friends by adding them to the internal list&lt;br /&gt;
				; just like friends added from the config file only on a&lt;br /&gt;
				; as-needed basis? (yes|no)&lt;br /&gt;
&lt;br /&gt;
;rtupdate=yes			; Send registry updates to database using realtime? (yes|no)&lt;br /&gt;
				; If set to yes, when a IAX2 peer registers successfully, the ip address,&lt;br /&gt;
				; the origination port, the registration period, and the username of&lt;br /&gt;
				; the peer will be set to database via realtime. If not present, defaults to 'yes'.&lt;br /&gt;
&lt;br /&gt;
;rtautoclear=yes		; Auto-Expire friends created on the fly on the same schedule&lt;br /&gt;
				; as if it had just registered? (yes|no|&amp;lt;seconds&amp;gt;)&lt;br /&gt;
				; If set to yes, when the registration expires, the friend will vanish from&lt;br /&gt;
				; the configuration until requested again. If set to an integer,&lt;br /&gt;
				; friends expire within this number of seconds instead of the&lt;br /&gt;
				; registration interval.&lt;br /&gt;
&lt;br /&gt;
;rtignoreregexpire=yes		; When reading a peer from Realtime, if the peer's registration&lt;br /&gt;
				; has expired based on its registration interval, used the stored&lt;br /&gt;
				; address information regardless. (yes|no)&lt;br /&gt;
&lt;br /&gt;
; Guest sections for unauthenticated connection attempts.  Just specify an&lt;br /&gt;
; empty secret, or provide no secret section.&lt;br /&gt;
;&lt;br /&gt;
[guest]&lt;br /&gt;
type=user&lt;br /&gt;
context=default&lt;br /&gt;
callerid=&amp;quot;Guest IAX User&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Trust Caller*ID Coming from iaxtel.com&lt;br /&gt;
;&lt;br /&gt;
[iaxtel]&lt;br /&gt;
type=user&lt;br /&gt;
context=default&lt;br /&gt;
auth=rsa&lt;br /&gt;
inkeys=iaxtel&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Trust Caller*ID Coming from iax.fwdnet.net&lt;br /&gt;
;&lt;br /&gt;
[iaxfwd]&lt;br /&gt;
type=user&lt;br /&gt;
context=default&lt;br /&gt;
auth=rsa&lt;br /&gt;
inkeys=freeworlddialup&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Trust callerid delivered over DUNDi/e164&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
;[dundi]&lt;br /&gt;
;type=user&lt;br /&gt;
;dbsecret=dundi/secret&lt;br /&gt;
;context=dundi-e164-local&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Further user sections may be added, specifying a context and a secret used&lt;br /&gt;
; for connections with that given authentication name.  Limited IP based&lt;br /&gt;
; access control is allowed by use of &amp;quot;allow&amp;quot; and &amp;quot;deny&amp;quot; keywords.  Multiple&lt;br /&gt;
; rules are permitted.  Multiple permitted contexts may be specified, in&lt;br /&gt;
; which case the first will be the default.  You can also override caller*ID&lt;br /&gt;
; so that when you receive a call you set the Caller*ID to be what you want&lt;br /&gt;
; instead of trusting what the remote user provides&lt;br /&gt;
;&lt;br /&gt;
; There are three authentication methods that are supported:  md5, plaintext,&lt;br /&gt;
; and rsa.  The least secure is &amp;quot;plaintext&amp;quot;, which sends passwords cleartext&lt;br /&gt;
; across the net.  &amp;quot;md5&amp;quot; uses a challenge/response md5 sum arrangement, but&lt;br /&gt;
; still requires both ends have plain text access to the secret.  &amp;quot;rsa&amp;quot; allows&lt;br /&gt;
; unidirectional secret knowledge through public/private keys.  If &amp;quot;rsa&amp;quot;&lt;br /&gt;
; authentication is used, &amp;quot;inkeys&amp;quot; is a list of acceptable public keys on the &lt;br /&gt;
; local system that can be used to authenticate the remote peer, separated by&lt;br /&gt;
; the &amp;quot;:&amp;quot; character.  &amp;quot;outkey&amp;quot; is a single, private key to use to authenticate&lt;br /&gt;
; to the other side.  Public keys are named /var/lib/asterisk/keys/&amp;lt;name&amp;gt;.pub&lt;br /&gt;
; while private keys are named /var/lib/asterisk/keys/&amp;lt;name&amp;gt;.key.  Private&lt;br /&gt;
; keys should always be 3DES encrypted.&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; NOTE: All hostnames and IP addresses in this file are for example purposes&lt;br /&gt;
;       only; you should not expect any of them to actually be available for&lt;br /&gt;
;       your use.&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
;[markster]&lt;br /&gt;
;type=user&lt;br /&gt;
;context=default&lt;br /&gt;
;context=local&lt;br /&gt;
;auth=md5,plaintext,rsa&lt;br /&gt;
;secret=markpasswd&lt;br /&gt;
;setvar=foo=bar&lt;br /&gt;
;dbsecret=mysecrets/place	; Secrets can be stored in astdb, too&lt;br /&gt;
;notransfer=yes		; Disable IAX native transfer&lt;br /&gt;
;jitterbuffer=yes	; Override global setting an enable jitter buffer&lt;br /&gt;
;			; for this user&lt;br /&gt;
;maxauthreq=10		; Set maximum number of outstanding AUTHREQs waiting for replies. Any further authentication attempts will be blocked&lt;br /&gt;
;			; if this limit is reached until they expire or a reply is received.&lt;br /&gt;
;callerid=&amp;quot;Mark Spencer&amp;quot; &amp;lt;(256) 428-6275&amp;gt;&lt;br /&gt;
;deny=0.0.0.0/0.0.0.0&lt;br /&gt;
;accountcode=markster0101&lt;br /&gt;
;permit=209.16.236.73/255.255.255.0&lt;br /&gt;
;language=en		; Use english as default language&lt;br /&gt;
;&lt;br /&gt;
; Peers may also be specified, with a secret and&lt;br /&gt;
; a remote hostname.&lt;br /&gt;
;&lt;br /&gt;
[demo]&lt;br /&gt;
type=peer&lt;br /&gt;
username=asterisk&lt;br /&gt;
secret=supersecret&lt;br /&gt;
host=216.207.245.47&lt;br /&gt;
;sendani=no&lt;br /&gt;
;host=asterisk.linux-support.net&lt;br /&gt;
;port=5036&lt;br /&gt;
;mask=255.255.255.255&lt;br /&gt;
;qualify=yes			; Make sure this peer is alive&lt;br /&gt;
;qualifysmoothing = yes		; use an average of the last two PONG&lt;br /&gt;
				; results to reduce falsely detected LAGGED hosts&lt;br /&gt;
				; Default: Off&lt;br /&gt;
;qualifyfreqok = 60000		; how frequently to ping the peer when&lt;br /&gt;
				; everything seems to be ok, in milliseconds&lt;br /&gt;
;qualifyfreqnotok = 10000	; how frequently to ping the peer when it's&lt;br /&gt;
				; either LAGGED or UNAVAILABLE, in milliseconds&lt;br /&gt;
;jitterbuffer=no		; Turn off jitter buffer for this peer&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Peers can remotely register as well, so that they can be mobile.  Default&lt;br /&gt;
; IP's can also optionally be given but are not required.  Caller*ID can be&lt;br /&gt;
; suggested to the other side as well if it is for example a phone instead of&lt;br /&gt;
; another PBX.&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
;[dynamichost]&lt;br /&gt;
;host=dynamic&lt;br /&gt;
;secret=mysecret&lt;br /&gt;
;mailbox=1234		; Notify about mailbox 1234&lt;br /&gt;
;inkeys=key1:key2&lt;br /&gt;
;peercontext=local	; Default context to request for calls to peer&lt;br /&gt;
;defaultip=216.207.245.34&lt;br /&gt;
;callerid=&amp;quot;Some Host&amp;quot; &amp;lt;(256) 428-6011&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
;[biggateway]&lt;br /&gt;
;type=peer&lt;br /&gt;
;host=192.168.0.1&lt;br /&gt;
;context=*&lt;br /&gt;
;secret=myscret&lt;br /&gt;
;trunk=yes			; Use IAX2 trunking with this host&lt;br /&gt;
;timezone=America/New_York	; Set a timezone for the date/time IE&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Friends are a short cut for creating a user and&lt;br /&gt;
; a peer with the same values.&lt;br /&gt;
;&lt;br /&gt;
;[marko]&lt;br /&gt;
;type=friend&lt;br /&gt;
;host=dynamic&lt;br /&gt;
;regexten=1234&lt;br /&gt;
;secret=moofoo   ; Multiple secrets may be specified. For a &amp;quot;user&amp;quot;, all&lt;br /&gt;
;secret=foomoo   ; specified entries will be accepted as valid. For a &amp;quot;peer&amp;quot;,&lt;br /&gt;
;secret=shazbot  ; only the last specified secret will be used.&lt;br /&gt;
;context=default&lt;br /&gt;
;permit=0.0.0.0/0.0.0.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/H.323</id>
		<title>H.323</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/H.323"/>
				<updated>2007-09-04T13:29:51Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Asterisk PBX supports H.323 via two totally separate channel drivers.&lt;br /&gt;
&lt;br /&gt;
You can find more information Asterisk's native H.323 support in /path/to/asterisk/channels/h323/README or you can download a third party driver at http://www.inaccessnetworks.com/projects/asterisk-oh323&lt;br /&gt;
&lt;br /&gt;
Asterisk's native H.323 is supported and maintained by Jeremy McNamara (JerJer in irc). Support for the third party H.323 driver is supplied by in AccessNetworks. &lt;br /&gt;
&lt;br /&gt;
If you have trouble with either driver you should direct your debug and comments to the appropriate party, making sure to be specific in exactly which H.323 driver you are running.&lt;br /&gt;
&lt;br /&gt;
Please, read all supplied documentation before contacting either party for support. Many issues can be quickly resolved by simply following the instructions that are provided.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Features</id>
		<title>Features</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Features"/>
				<updated>2007-09-04T13:29:15Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Example==&lt;br /&gt;
; features.conf&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Sample Parking configuration&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
[general]&lt;br /&gt;
parkext =&amp;gt; 700			; What extension to dial to park&lt;br /&gt;
parkpos =&amp;gt; 701-720		; What extensions to park calls on. These needs to be&lt;br /&gt;
				; numeric, as Asterisk starts from the start position&lt;br /&gt;
				; and increments with one for the next parked call.&lt;br /&gt;
context =&amp;gt; parkedcalls		; Which context parked calls are in&lt;br /&gt;
;parkingtime =&amp;gt; 45		; Number of seconds a call can be parked for &lt;br /&gt;
				; (default is 45 seconds)&lt;br /&gt;
;transferdigittimeout =&amp;gt; 3	; Number of seconds to wait between digits when transferring a call&lt;br /&gt;
;courtesytone = beep		; Sound file to play to the parked caller &lt;br /&gt;
				; when someone dials a parked call&lt;br /&gt;
;xfersound = beep		; to indicate an attended transfer is complete&lt;br /&gt;
;xferfailsound = beeperr	; to indicate a failed transfer&lt;br /&gt;
;adsipark = yes			; if you want ADSI parking announcements&lt;br /&gt;
;findslot =&amp;gt; next		; Continue to the 'next' free parking space. &lt;br /&gt;
				; Defaults to 'first' available&lt;br /&gt;
pickupexten = *8		; Configure the pickup extension.  Default is *8&lt;br /&gt;
;featuredigittimeout = 500	; Max time (ms) between digits for &lt;br /&gt;
				; feature activation.  Default is 500&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[featuremap]&lt;br /&gt;
;blindxfer =&amp;gt; #1		; Blind transfer&lt;br /&gt;
;disconnect =&amp;gt; *0		; Disconnect&lt;br /&gt;
;automon =&amp;gt; *1			; One Touch Record&lt;br /&gt;
;atxfer =&amp;gt; *2			; Attended transfer&lt;br /&gt;
&lt;br /&gt;
[applicationmap]&lt;br /&gt;
; Note that the DYNAMIC_FEATURES channel variable must be set to use the features&lt;br /&gt;
; defined here.  The value of DYNAMIC_FEATURES should be the names of the features&lt;br /&gt;
; to allow the channel to use separated by '#'.  For example:&lt;br /&gt;
;    Set(DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3)&lt;br /&gt;
;&lt;br /&gt;
;testfeature =&amp;gt; #9,callee,Playback,tt-monkeys	;Play tt-monkeys to &lt;br /&gt;
						;callee if #9 was pressed&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Externalivr</id>
		<title>Externalivr</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Externalivr"/>
				<updated>2007-09-04T13:28:46Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you load app_externalivr.so in your Asterisk instance, you will have an ExternalIVR() application available in your dialplan. This application implements a simple protocol for bidirectional communication with an external process, while simultaneous playing audio files to the connected channel (without interruption or blocking).&lt;br /&gt;
&lt;br /&gt;
The arguments to ExternalIVR() consist of the command to execute and any arguments to pass to it, the same as the System() application accepts. The external command will be executed in a child process, with its standard file handles connected to the Asterisk process as follows:&lt;br /&gt;
&lt;br /&gt;
stdin (0) - DTMF and hangup events will be received on this handle&lt;br /&gt;
stdout (1) - Playback and hangup commands can be sent on this handle&lt;br /&gt;
stderr (2) - Error messages can be sent on this handle&lt;br /&gt;
&lt;br /&gt;
The application will also create an audio generator to play audio to the channel, and will start playing silence. When your application wants to send audio to the channel, it can send a command (see below) to add file(s) to the generator's playlist. The generator will then work its way through the list, playing each file in turn until it either runs out of files to play, the channel is hung up, or a command is received to clear the list and start with a new file. At any time, more files can be added to the list and the generator will play them in sequence.&lt;br /&gt;
&lt;br /&gt;
While the generator is playing audio (or silence), any DTMF events received on the channel will be sent to the child process (see below). Note that this can happen at any time, since the generator, the child process and the channel thread are all executing independently. It is very important that your external application be ready to receive events from Asterisk at all times (without blocking), or you could cause the channel to become non-responsive.&lt;br /&gt;
&lt;br /&gt;
If the child process dies, ExternalIVR() will notice this and hang up the channel immediately (and also send a message to the log).&lt;br /&gt;
&lt;br /&gt;
DTMF (and other) events&lt;br /&gt;
-----------------------&lt;br /&gt;
&lt;br /&gt;
All events will be newline-terminated strings.&lt;br /&gt;
&lt;br /&gt;
Events send to the child's stdin will be in the following format:&lt;br /&gt;
&lt;br /&gt;
tag,timestamp[,data]&lt;br /&gt;
&lt;br /&gt;
The tag can be one of the following characters:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
0-9: DTMF event for keys 0 through 9&lt;br /&gt;
A-D: DTMF event for keys A through D&lt;br /&gt;
*: DTMF event for key *&lt;br /&gt;
#: DTMF event for key #&lt;br /&gt;
H: the channel was hung up by the connected party&lt;br /&gt;
Z: the previous command was unable to be executed (file does not exist, etc.)&lt;br /&gt;
T: the play list was interrupted (see below)&lt;br /&gt;
D: a file was dropped from the play list due to interruption (the data element will be the dropped file name)&lt;br /&gt;
F: a file has finished playing (the data element will be the file name)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The timestamp will be 10 digits long, and will be a decimal&lt;br /&gt;
representation of a standard Unix epoch-based timestamp.&lt;br /&gt;
&lt;br /&gt;
Commands&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
All commands must be newline-terminated strings.&lt;br /&gt;
&lt;br /&gt;
The child process can send commands on stdout in the following formats:&lt;br /&gt;
&lt;br /&gt;
 S,filename&lt;br /&gt;
 A,filename&lt;br /&gt;
 H,message&lt;br /&gt;
 O,option&lt;br /&gt;
&lt;br /&gt;
The 'S' command checks to see if there is a playable audio file with the specified name, and if so, clear's the generator's playlist and places the file onto the list. Note that the playability check does not take into account transcoding requirements, so it is possible for the file to not be played even though it was found. If the file cannot be found, a 'Z' event (see above) will be sent to the child. If the generator is not currently playing silence, then T and D events will be sent to the child to signal the playlist interruption and notify it of the files that will not be played.&lt;br /&gt;
&lt;br /&gt;
The 'A' command checks to see if there is a playable audio file with the specified name, and if so, adds it to the generator's playlist. The same playability and exception rules apply as for the 'S' command.&lt;br /&gt;
&lt;br /&gt;
The 'H' command stops the generator and hangs up the channel, and logs the supplied message to the Asterisk log.&lt;br /&gt;
&lt;br /&gt;
The 'O' command allows the child to set/clear options in the&lt;br /&gt;
ExternalIVR() application. The supported options are:&lt;br /&gt;
autoclear/noautoclear:&lt;br /&gt;
Automatically interrupt and clear the playlist upon reception&lt;br /&gt;
of DTMF input.&lt;br /&gt;
&lt;br /&gt;
Errors&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
Any newline-terminated output generated by the child process on its&lt;br /&gt;
stderr handle will be copied into the Asterisk log.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Extensions</id>
		<title>Extensions</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Extensions"/>
				<updated>2007-09-04T13:28:17Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: /* Info about application 'Dial' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Asterisk dialplan is divided into contexts. A context is simply a group of extensions. For each &amp;quot;line&amp;quot; that should be able to be called, an extension must be added to a context. Then, you configure the calling &amp;quot;line&amp;quot; to have access to this context.&lt;br /&gt;
&lt;br /&gt;
If you change the dialplan, you can use the Asterisk CLI command &amp;quot;extensions reload&amp;quot; to load the new dialplan without disrupting service in your PBX.&lt;br /&gt;
&lt;br /&gt;
Extensions are routed according to priority and may be based on any set of characters (a-z), digits, #, and *. Please note that when matching a pattern, &amp;quot;N&amp;quot;, &amp;quot;X&amp;quot;, and &amp;quot;Z&amp;quot; are interpreted as classes of digits.&lt;br /&gt;
&lt;br /&gt;
For each extension, several actions may be listed and must be given a unique priority. When each action completes, the call continunes at the next priority (except for some modules which use explicitly GOTO's). &lt;br /&gt;
&lt;br /&gt;
When each action completes, it generally moves to the next priority (except for some modules which use explicitly GOTO's. &lt;br /&gt;
&lt;br /&gt;
Extensions frequently have data they pass to the executing application (most frequently a string). You can see the available dialplan applications by entering the &amp;quot;show applications&amp;quot; command in the CLI.&lt;br /&gt;
&lt;br /&gt;
In this version of Asterisk, dialplan functions are added. These can be used as arguments to any application. For a list of the installed functions in your Asterisk, use the &amp;quot;show functions&amp;quot; command.&lt;br /&gt;
&lt;br /&gt;
==Special extensions==&lt;br /&gt;
&lt;br /&gt;
There are some extensions with important meanings:&lt;br /&gt;
&lt;br /&gt;
 s: What to do when an extension context is entered (unless&lt;br /&gt;
 overridden by the low level channel interface)&lt;br /&gt;
 This is used in macros, and some special cases. &lt;br /&gt;
 &amp;quot;s&amp;quot; is not a generic catch-all wildcard extension.&lt;br /&gt;
 i:  What to do if an invalid extension is entered&lt;br /&gt;
 h:  The hangup extension, executed at hangup&lt;br /&gt;
 t:  What to do if nothing is entered in the requisite amount of time.&lt;br /&gt;
 T:  This is the extension that is executed when the 'absolute'&lt;br /&gt;
     timeout is reached.  See &amp;quot;show function TIMEOUT&amp;quot; for more information on setting timeouts.	&lt;br /&gt;
&lt;br /&gt;
And finally, the extension context &amp;quot;default&amp;quot; is used when either a) an extension context is deleted while an extension is in use, or b) a specific starting extension handler has not been defined (unless overridden by the low level channel interface).&lt;br /&gt;
&lt;br /&gt;
== Info about application 'Dial' ==&lt;br /&gt;
; Synopsis : Place a call and connect to the current channel&lt;br /&gt;
&lt;br /&gt;
; Description : Dial(Technology/resource[&amp;amp;Tech2/resource2...][|timeout][|options][|URL]): This application will place calls to one or more specified channels. As soon as one of the requested channels answers, the originating channel will be answered, if it has not already been answered. These two channels will then be active in a bridged call. All other channels that were requested will then be hung up. Unless there is a timeout specified, the Dial application will wait indefinitely until one of the called channels answers, the user hangs up, or if all of the called channels are busy or unavailable. Dialplan executing will continue if no requested channels can be called, or if the timeout expires.&lt;br /&gt;
&lt;br /&gt;
  This application sets the following channel variables upon completion:&lt;br /&gt;
    DIALEDTIME   - This is the time from dialing a channel until when it&lt;br /&gt;
                   is disconnected.&lt;br /&gt;
    ANSWEREDTIME - This is the amount of time for actual call.&lt;br /&gt;
    DIALSTATUS   - This is the status of the call:&lt;br /&gt;
                   CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL&lt;br /&gt;
                   DONTCALL | TORTURE | INVALIDARGS&lt;br /&gt;
&lt;br /&gt;
For the Privacy and Screening Modes, the DIALSTATUS variable will be set to DONTCALL if the called party chooses to send the calling party to the 'Go Away' script. The DIALSTATUS variable will be set to TORTURE if the called party wants to send the caller to the 'torture' script. This application will report normal termination if the originating channel hangs up, or if the call is bridged and either of the parties in the bridge ends the call. The optional URL will be sent to the called party if the channel supports it. If the OUTBOUND_GROUP variable is set, all peer channels created by this application will be put into that group (as in Set(GROUP()=...). If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP, however, the variable will be unset after use.&lt;br /&gt;
&lt;br /&gt;
  Options:&lt;br /&gt;
    A(x) - Play an announcement to the called party, using 'x' as the file.&lt;br /&gt;
    C    - Reset the CDR for this call.&lt;br /&gt;
    d    - Allow the calling user to dial a 1 digit extension while waiting for&lt;br /&gt;
           a call to be answered. Exit to that extension if it exists in the&lt;br /&gt;
           current context, or the context defined in the EXITCONTEXT variable,&lt;br /&gt;
           if it exists.&lt;br /&gt;
    D([called][:calling]) - Send the specified DTMF strings *after* the called&lt;br /&gt;
           party has answered, but before the call gets bridged. The 'called'&lt;br /&gt;
           DTMF string is sent to the called party, and the 'calling' DTMF&lt;br /&gt;
           string is sent to the calling party. Both parameters can be used&lt;br /&gt;
           alone.&lt;br /&gt;
    f    - Force the callerid of the *calling* channel to be set as the&lt;br /&gt;
           extension associated with the channel using a dialplan 'hint'.&lt;br /&gt;
           For example, some PSTNs do not allow CallerID to be set to anything&lt;br /&gt;
           other than the number assigned to the caller.&lt;br /&gt;
    g    - Proceed with dialplan execution at the current extension if the&lt;br /&gt;
           destination channel hangs up.&lt;br /&gt;
    G(context^exten^pri) - If the call is answered, transfer the calling party to&lt;br /&gt;
           the specified priority and the called party to the specified priority+1.&lt;br /&gt;
           Optionally, an extension, or extension and context may be specified.&lt;br /&gt;
           Otherwise, the current extension is used. You cannot use any additional&lt;br /&gt;
           action post answer options in conjunction with this option.&lt;br /&gt;
    h    - Allow the called party to hang up by sending the '*' DTMF digit.&lt;br /&gt;
    H    - Allow the calling party to hang up by hitting the '*' DTMF digit.&lt;br /&gt;
    j    - Jump to priority n+101 if all of the requested channels were busy.&lt;br /&gt;
    L(x[:y][:z]) - Limit the call to 'x' ms. Play a warning when 'y' ms are&lt;br /&gt;
           left. Repeat the warning every 'z' ms. The following special&lt;br /&gt;
           variables can be used with this option:&lt;br /&gt;
           * LIMIT_PLAYAUDIO_CALLER   yes|no (default yes)&lt;br /&gt;
                                      Play sounds to the caller.&lt;br /&gt;
           * LIMIT_PLAYAUDIO_CALLEE   yes|no&lt;br /&gt;
                                      Play sounds to the callee.&lt;br /&gt;
           * LIMIT_TIMEOUT_FILE       File to play when time is up.&lt;br /&gt;
           * LIMIT_CONNECT_FILE       File to play when call begins.&lt;br /&gt;
           * LIMIT_WARNING_FILE       File to play as warning if 'y' is defined.&lt;br /&gt;
                                      The default is to say the time remaining.&lt;br /&gt;
    m([class]) - Provide hold music to the calling party until a requested&lt;br /&gt;
           channel answers. A specific MusicOnHold class can be&lt;br /&gt;
           specified.&lt;br /&gt;
    M(x[^arg]) - Execute the Macro for the *called* channel before connecting&lt;br /&gt;
           to the calling channel. Arguments can be specified to the Macro&lt;br /&gt;
           using '^' as a delimeter. The Macro can set the variable&lt;br /&gt;
           MACRO_RESULT to specify the following actions after the Macro is&lt;br /&gt;
           finished executing.&lt;br /&gt;
           * ABORT        Hangup both legs of the call.&lt;br /&gt;
           * CONGESTION   Behave as if line congestion was encountered.&lt;br /&gt;
           * BUSY         Behave as if a busy signal was encountered. This will also&lt;br /&gt;
                          have the application jump to priority n+101 if the&lt;br /&gt;
                          'j' option is set.&lt;br /&gt;
           * CONTINUE     Hangup the called party and allow the calling party&lt;br /&gt;
                          to continue dialplan execution at the next priority.&lt;br /&gt;
           * GOTO:&amp;lt;context&amp;gt;^&amp;lt;exten&amp;gt;^&amp;lt;priority&amp;gt; - Transfer the call to the&lt;br /&gt;
                          specified priority. Optionally, an extension, or&lt;br /&gt;
                          extension and priority can be specified.&lt;br /&gt;
           You cannot use any additional action post answer options in conjunction&lt;br /&gt;
           with this option.&lt;br /&gt;
    n    - This option is a modifier for the screen/privacy mode. It specifies&lt;br /&gt;
           that no introductions are to be saved in the priv-callerintros&lt;br /&gt;
           directory.&lt;br /&gt;
    N    - This option is a modifier for the screen/privacy mode. It specifies&lt;br /&gt;
           that if callerID is present, do not screen the call.&lt;br /&gt;
    o    - Specify that the CallerID that was present on the *calling* channel&lt;br /&gt;
           be set as the CallerID on the *called* channel. This was the&lt;br /&gt;
           behavior of Asterisk 1.0 and earlier.&lt;br /&gt;
    p    - This option enables screening mode. This is basically Privacy mode&lt;br /&gt;
           without memory.&lt;br /&gt;
    P([x]) - Enable privacy mode. Use 'x' as the family/key in the database if&lt;br /&gt;
           it is provided. The current extension is used if a database&lt;br /&gt;
           family/key is not specified.&lt;br /&gt;
    r    - Indicate ringing to the calling party. Pass no audio to the calling&lt;br /&gt;
           party until the called channel has answered.&lt;br /&gt;
    S(x) - Hang up the call after 'x' seconds *after* the called party has&lt;br /&gt;
           answered the call.&lt;br /&gt;
    t    - Allow the called party to transfer the calling party by sending the&lt;br /&gt;
           DTMF sequence defined in features.conf.&lt;br /&gt;
    T    - Allow the calling party to transfer the called party by sending the&lt;br /&gt;
           DTMF sequence defined in features.conf.&lt;br /&gt;
    w    - Allow the called party to enable recording of the call by sending&lt;br /&gt;
           the DTMF sequence defined for one-touch recording in features.conf.&lt;br /&gt;
    W    - Allow the calling party to enable recording of the call by sending&lt;br /&gt;
           the DTMF sequence defined for one-touch recording in features.conf.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sample dial plan. extensions.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Static extension configuration file, used by&lt;br /&gt;
; the pbx_config module. This is where you configure all your &lt;br /&gt;
; inbound and outbound calls in Asterisk. &lt;br /&gt;
; &lt;br /&gt;
; This configuration file is reloaded &lt;br /&gt;
; - With the &amp;quot;extensions reload&amp;quot; command in the CLI&lt;br /&gt;
; - With the &amp;quot;reload&amp;quot; command (that reloads everything) in the CLI&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; The &amp;quot;General&amp;quot; category is for certain variables.  &lt;br /&gt;
;&lt;br /&gt;
[general]&lt;br /&gt;
;&lt;br /&gt;
; If static is set to no, or omitted, then the pbx_config will rewrite&lt;br /&gt;
; this file when extensions are modified.  Remember that all comments&lt;br /&gt;
; made in the file will be lost when that happens. &lt;br /&gt;
;&lt;br /&gt;
; XXX Not yet implemented XXX&lt;br /&gt;
;&lt;br /&gt;
static=yes&lt;br /&gt;
;&lt;br /&gt;
; if static=yes and writeprotect=no, you can save dialplan by&lt;br /&gt;
; CLI command 'save dialplan' too&lt;br /&gt;
;&lt;br /&gt;
writeprotect=no&lt;br /&gt;
;&lt;br /&gt;
; If autofallthrough is set, then if an extension runs out of&lt;br /&gt;
; things to do, it will terminate the call with BUSY, CONGESTION&lt;br /&gt;
; or HANGUP depending on Asterisk's best guess (strongly recommended).&lt;br /&gt;
;&lt;br /&gt;
; If autofallthrough is not set, then if an extension runs out of &lt;br /&gt;
; things to do, asterisk will wait for a new extension to be dialed &lt;br /&gt;
; (this is the original behavior of Asterisk 1.0 and earlier).&lt;br /&gt;
;&lt;br /&gt;
autofallthrough=yes&lt;br /&gt;
;&lt;br /&gt;
; If clearglobalvars is set, global variables will be cleared &lt;br /&gt;
; and reparsed on an extensions reload, or Asterisk reload.&lt;br /&gt;
;&lt;br /&gt;
; If clearglobalvars is not set, then global variables will persist&lt;br /&gt;
; through reloads, and even if deleted from the extensions.conf or&lt;br /&gt;
; one of its included files, will remain set to the previous value.&lt;br /&gt;
;&lt;br /&gt;
clearglobalvars=no&lt;br /&gt;
;&lt;br /&gt;
; If priorityjumping is set to 'yes', then applications that support&lt;br /&gt;
; 'jumping' to a different priority based on the result of their operations&lt;br /&gt;
; will do so (this is backwards compatible behavior with pre-1.2 releases&lt;br /&gt;
; of Asterisk). Individual applications can also be requested to do this&lt;br /&gt;
; by passing a 'j' option in their arguments.&lt;br /&gt;
;&lt;br /&gt;
priorityjumping=no&lt;br /&gt;
;&lt;br /&gt;
; You can include other config files, use the #include command&lt;br /&gt;
; (without the ';'). Note that this is different from the &amp;quot;include&amp;quot; command&lt;br /&gt;
; that includes contexts within other contexts. The #include command works&lt;br /&gt;
; in all asterisk configuration files.&lt;br /&gt;
;#include &amp;quot;filename.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; The &amp;quot;Globals&amp;quot; category contains global variables that can be referenced&lt;br /&gt;
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental&lt;br /&gt;
; variables,&lt;br /&gt;
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid&lt;br /&gt;
;&lt;br /&gt;
[globals]&lt;br /&gt;
CONSOLE=Console/dsp				; Console interface for demo&lt;br /&gt;
;CONSOLE=Zap/1&lt;br /&gt;
;CONSOLE=Phone/phone0&lt;br /&gt;
IAXINFO=guest					; IAXtel username/password&lt;br /&gt;
;IAXINFO=myuser:mypass&lt;br /&gt;
TRUNK=Zap/g2					; Trunk interface&lt;br /&gt;
;&lt;br /&gt;
; Note the 'g2' in the TRUNK variable above. It specifies which group (defined&lt;br /&gt;
; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in&lt;br /&gt;
; the specified group. The four possible options are:&lt;br /&gt;
;&lt;br /&gt;
; g: select the lowest-numbered non-busy Zap channel&lt;br /&gt;
;    (aka. ascending sequential hunt group).&lt;br /&gt;
; G: select the highest-numbered non-busy Zap channel&lt;br /&gt;
;    (aka. descending sequential hunt group).&lt;br /&gt;
; r: use a round-robin search, starting at the next highest channel than last&lt;br /&gt;
;    time (aka. ascending rotary hunt group).&lt;br /&gt;
; R: use a round-robin search, starting at the next lowest channel than last&lt;br /&gt;
;    time (aka. descending rotary hunt group).&lt;br /&gt;
;&lt;br /&gt;
TRUNKMSD=1					; MSD digits to strip (usually 1 or 0)&lt;br /&gt;
;TRUNK=IAX2/user:pass@provider&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Any category other than &amp;quot;General&amp;quot; and &amp;quot;Globals&amp;quot; represent &lt;br /&gt;
; extension contexts, which are collections of extensions.  &lt;br /&gt;
;&lt;br /&gt;
; Extension names may be numbers, letters, or combinations&lt;br /&gt;
; thereof. If an extension name is prefixed by a '_'&lt;br /&gt;
; character, it is interpreted as a pattern rather than a&lt;br /&gt;
; literal.  In patterns, some characters have special meanings:&lt;br /&gt;
;&lt;br /&gt;
;   X - any digit from 0-9&lt;br /&gt;
;   Z - any digit from 1-9&lt;br /&gt;
;   N - any digit from 2-9&lt;br /&gt;
;   [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)&lt;br /&gt;
;   . - wildcard, matches anything remaining (e.g. _9011. matches &lt;br /&gt;
;	anything starting with 9011 excluding 9011 itself)&lt;br /&gt;
;   ! - wildcard, causes the matching process to complete as soon as&lt;br /&gt;
;       it can unambiguously determine that no other matches are possible&lt;br /&gt;
;&lt;br /&gt;
; For example the extension _NXXXXXX would match normal 7 digit dialings, &lt;br /&gt;
; while _1NXXNXXXXXX would represent an area code plus phone number&lt;br /&gt;
; preceded by a one.&lt;br /&gt;
;&lt;br /&gt;
; Each step of an extension is ordered by priority, which must&lt;br /&gt;
; always start with 1 to be considered a valid extension.  The priority&lt;br /&gt;
; &amp;quot;next&amp;quot; or &amp;quot;n&amp;quot; means the previous priority plus one, regardless of whether&lt;br /&gt;
; the previous priority was associated with the current extension or not.&lt;br /&gt;
; The priority &amp;quot;same&amp;quot; or &amp;quot;s&amp;quot; means the same as the previously specified&lt;br /&gt;
; priority, again regardless of whether the previous entry was for the&lt;br /&gt;
; same extension.  Priorities may be immediately followed by a plus sign&lt;br /&gt;
; and another integer to add that amount (most useful with 's' or 'n').  &lt;br /&gt;
; Priorities may then also have an alias, or label, in &lt;br /&gt;
; parenthesis after their name which can be used in goto situations&lt;br /&gt;
;&lt;br /&gt;
; Contexts contain several lines, one for each step of each&lt;br /&gt;
; extension, which can take one of two forms as listed below,&lt;br /&gt;
; with the first form being preferred.  One may include another&lt;br /&gt;
; context in the current one as well, optionally with a&lt;br /&gt;
; date and time.  Included contexts are included in the order&lt;br /&gt;
; they are listed.&lt;br /&gt;
;&lt;br /&gt;
;[context]&lt;br /&gt;
;exten =&amp;gt; someexten,priority[+offset][(alias)],application(arg1,arg2,...)&lt;br /&gt;
;exten =&amp;gt; someexten,priority[+offset][(alias)],application,arg1|arg2...&lt;br /&gt;
;&lt;br /&gt;
; Timing list for includes is &lt;br /&gt;
;&lt;br /&gt;
;   &amp;lt;time range&amp;gt;|&amp;lt;days of week&amp;gt;|&amp;lt;days of month&amp;gt;|&amp;lt;months&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
;include =&amp;gt; daytime|9:00-17:00|mon-fri|*|*&lt;br /&gt;
;&lt;br /&gt;
; ignorepat can be used to instruct drivers to not cancel dialtone upon&lt;br /&gt;
; receipt of a particular pattern.  The most commonly used example is&lt;br /&gt;
; of course '9' like this:&lt;br /&gt;
;&lt;br /&gt;
;ignorepat =&amp;gt; 9&lt;br /&gt;
;&lt;br /&gt;
; so that dialtone remains even after dialing a 9.&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Sample entries for extensions.conf&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
[dundi-e164-canonical]&lt;br /&gt;
;&lt;br /&gt;
; List canonical entries here&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; 12564286000,1,Macro(stdexten,6000,IAX2/foo)&lt;br /&gt;
;exten =&amp;gt; _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})&lt;br /&gt;
&lt;br /&gt;
[dundi-e164-customers]&lt;br /&gt;
;&lt;br /&gt;
; If you are an ITSP or Reseller, list your customers here.&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; _12564286000,1,Dial(SIP/customer1)&lt;br /&gt;
;exten =&amp;gt; _12564286001,1,Dial(IAX2/customer2)&lt;br /&gt;
&lt;br /&gt;
[dundi-e164-via-pstn]&lt;br /&gt;
;&lt;br /&gt;
; If you are freely delivering calls to the PSTN, list them here&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; _1256428XXXX,1,Dial(Zap/g2/${EXTEN:7}) ; Expose all of 256-428 &lt;br /&gt;
;exten =&amp;gt; _1256325XXXX,1,Dial(Zap/g2/${EXTEN:7}) ; Ditto for 256-325&lt;br /&gt;
&lt;br /&gt;
[dundi-e164-local]&lt;br /&gt;
;&lt;br /&gt;
; Context to put your dundi IAX2 or SIP user in for&lt;br /&gt;
; full access&lt;br /&gt;
;&lt;br /&gt;
include =&amp;gt; dundi-e164-canonical&lt;br /&gt;
include =&amp;gt; dundi-e164-customers&lt;br /&gt;
include =&amp;gt; dundi-e164-via-pstn&lt;br /&gt;
&lt;br /&gt;
[dundi-e164-switch]&lt;br /&gt;
;&lt;br /&gt;
; Just a wrapper for the switch&lt;br /&gt;
;&lt;br /&gt;
switch =&amp;gt; DUNDi/e164&lt;br /&gt;
&lt;br /&gt;
[dundi-e164-lookup]&lt;br /&gt;
;&lt;br /&gt;
; Locally to lookup, try looking for a local E.164 solution&lt;br /&gt;
; then try DUNDi if we don't have one.&lt;br /&gt;
;&lt;br /&gt;
include =&amp;gt; dundi-e164-local&lt;br /&gt;
include =&amp;gt; dundi-e164-switch&lt;br /&gt;
;&lt;br /&gt;
; DUNDi can also be implemented as a Macro instead of using &lt;br /&gt;
; the Local channel driver. &lt;br /&gt;
;&lt;br /&gt;
[macro-dundi-e164]&lt;br /&gt;
;&lt;br /&gt;
; ARG1 is the extension to Dial&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; s,1,Goto(${ARG1},1)&lt;br /&gt;
include =&amp;gt; dundi-e164-lookup&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Here are the entries you need to participate in the IAXTEL&lt;br /&gt;
; call routing system.  Most IAXTEL numbers begin with 1-700, but&lt;br /&gt;
; there are exceptions.  For more information, and to sign&lt;br /&gt;
; up, please go to www.gnophone.com or www.iaxtel.com&lt;br /&gt;
;&lt;br /&gt;
[iaxtel700]&lt;br /&gt;
exten =&amp;gt; _91700XXXXXXX,1,Dial(IAX2/${IAXINFO}@iaxtel.com/${EXTEN:1}@iaxtel)&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; The SWITCH statement permits a server to share the dialplan with&lt;br /&gt;
; another server. Use with care: Reciprocal switch statements are not&lt;br /&gt;
; allowed (e.g. both A -&amp;gt; B and B -&amp;gt; A), and the switched server needs&lt;br /&gt;
; to be on-line or else dialing can be severly delayed.&lt;br /&gt;
;&lt;br /&gt;
[iaxprovider]&lt;br /&gt;
;switch =&amp;gt; IAX2/user:[key]@myserver/mycontext&lt;br /&gt;
&lt;br /&gt;
[trunkint]&lt;br /&gt;
;&lt;br /&gt;
; International long distance through trunk&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _9011.,1,Macro(dundi-e164,${EXTEN:4})&lt;br /&gt;
exten =&amp;gt; _9011.,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})&lt;br /&gt;
&lt;br /&gt;
[trunkld]&lt;br /&gt;
;&lt;br /&gt;
; Long distance context accessed through trunk&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})&lt;br /&gt;
exten =&amp;gt; _91NXXNXXXXXX,n,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})&lt;br /&gt;
&lt;br /&gt;
[trunklocal]&lt;br /&gt;
;&lt;br /&gt;
; Local seven-digit dialing accessed through trunk interface&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _9NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})&lt;br /&gt;
&lt;br /&gt;
[trunktollfree]&lt;br /&gt;
;&lt;br /&gt;
; Long distance context accessed through trunk interface&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _91800NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})&lt;br /&gt;
exten =&amp;gt; _91888NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})&lt;br /&gt;
exten =&amp;gt; _91877NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})&lt;br /&gt;
exten =&amp;gt; _91866NXXXXXX,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}})&lt;br /&gt;
&lt;br /&gt;
[international]&lt;br /&gt;
;&lt;br /&gt;
; Master context for international long distance&lt;br /&gt;
;&lt;br /&gt;
ignorepat =&amp;gt; 9&lt;br /&gt;
include =&amp;gt; longdistance&lt;br /&gt;
include =&amp;gt; trunkint&lt;br /&gt;
&lt;br /&gt;
[longdistance]&lt;br /&gt;
;&lt;br /&gt;
; Master context for long distance&lt;br /&gt;
;&lt;br /&gt;
ignorepat =&amp;gt; 9&lt;br /&gt;
include =&amp;gt; local&lt;br /&gt;
include =&amp;gt; trunkld&lt;br /&gt;
&lt;br /&gt;
[local]&lt;br /&gt;
;&lt;br /&gt;
; Master context for local, toll-free, and iaxtel calls only&lt;br /&gt;
;&lt;br /&gt;
ignorepat =&amp;gt; 9&lt;br /&gt;
include =&amp;gt; default&lt;br /&gt;
include =&amp;gt; parkedcalls&lt;br /&gt;
include =&amp;gt; trunklocal&lt;br /&gt;
include =&amp;gt; iaxtel700&lt;br /&gt;
include =&amp;gt; trunktollfree&lt;br /&gt;
include =&amp;gt; iaxprovider&lt;br /&gt;
;&lt;br /&gt;
; You can use an alternative switch type as well, to resolve&lt;br /&gt;
; extensions that are not known here, for example with remote &lt;br /&gt;
; IAX switching you transparently get access to the remote&lt;br /&gt;
; Asterisk PBX&lt;br /&gt;
; &lt;br /&gt;
; switch =&amp;gt; IAX2/user:password@bigserver/local&lt;br /&gt;
;&lt;br /&gt;
; An &amp;quot;lswitch&amp;quot; is like a switch but is literal, in that&lt;br /&gt;
; variable substitution is not performed at load time&lt;br /&gt;
; but is passed to the switch directly (presumably to&lt;br /&gt;
; be substituted in the switch routine itself)&lt;br /&gt;
;&lt;br /&gt;
; lswitch =&amp;gt; Loopback/12${EXTEN}@othercontext&lt;br /&gt;
;&lt;br /&gt;
; An &amp;quot;eswitch&amp;quot; is like a switch but the evaluation of&lt;br /&gt;
; variable substitution is performed at runtime before&lt;br /&gt;
; being passed to the switch routine.&lt;br /&gt;
;&lt;br /&gt;
; eswitch =&amp;gt; IAX2/context@${CURSERVER}&lt;br /&gt;
&lt;br /&gt;
[macro-stdexten];&lt;br /&gt;
;&lt;br /&gt;
; Standard extension macro:&lt;br /&gt;
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well&lt;br /&gt;
;   ${ARG2} - Device(s) to ring&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; s,1,Dial(${ARG2},20)			; Ring the interface, 20 seconds maximum&lt;br /&gt;
exten =&amp;gt; s,2,Goto(s-${DIALSTATUS},1)		; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; s-NOANSWER,1,Voicemail(u${ARG1})	; If unavailable, send to voicemail w/ unavail announce&lt;br /&gt;
exten =&amp;gt; s-NOANSWER,2,Goto(default,s,1)		; If they press #, return to start&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; s-BUSY,1,Voicemail(b${ARG1})		; If busy, send to voicemail w/ busy announce&lt;br /&gt;
exten =&amp;gt; s-BUSY,2,Goto(default,s,1)		; If they press #, return to start&lt;br /&gt;
exten =&amp;gt; _s-.,1,Goto(s-NOANSWER,1)		; Treat anything else as no answer&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; a,1,VoicemailMain(${ARG1})		; If they press *, send the user into VoicemailMain&lt;br /&gt;
&lt;br /&gt;
[macro-stdPrivacyexten];&lt;br /&gt;
;&lt;br /&gt;
; Standard extension macro:&lt;br /&gt;
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well&lt;br /&gt;
;   ${ARG2} - Device(s) to ring&lt;br /&gt;
;   ${ARG3} - Optional DONTCALL context name to jump to (assumes the s,1 extension-priority)&lt;br /&gt;
;   ${ARG4} - Optional TORTURE context name to jump to (assumes the s,1 extension-priority)`&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; s,1,Dial(${ARG2},20|p)			; Ring the interface, 20 seconds maximum, call screening option (or use P for databased call screening)&lt;br /&gt;
exten =&amp;gt; s,2,Goto(s-${DIALSTATUS},1)		; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; s-NOANSWER,1,Voicemail(u${ARG1})	; If unavailable, send to voicemail w/ unavail announce&lt;br /&gt;
exten =&amp;gt; s-NOANSWER,2,Goto(default,s,1)		; If they press #, return to start&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; s-BUSY,1,Voicemail(b${ARG1})		; If busy, send to voicemail w/ busy announce&lt;br /&gt;
exten =&amp;gt; s-BUSY,2,Goto(default,s,1)		; If they press #, return to start&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; s-DONTCALL,1,Goto(${ARG3},s,1)         ; Callee chose to send this call to a polite &amp;quot;Don't call again&amp;quot; script.&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; s-TORTURE,1,Goto(${ARG4},s,1)          ; Callee chose to send this call to a telemarketer torture script.&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; _s-.,1,Goto(s-NOANSWER,1)		; Treat anything else as no answer&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; a,1,VoicemailMain(${ARG1})		; If they press *, send the user into VoicemailMain&lt;br /&gt;
&lt;br /&gt;
[demo]&lt;br /&gt;
;&lt;br /&gt;
; We start with what to do when a call first comes in.&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; s,1,Wait,1			; Wait a second, just for fun&lt;br /&gt;
exten =&amp;gt; s,n,Answer			; Answer the line&lt;br /&gt;
exten =&amp;gt; s,n,Set(TIMEOUT(digit)=5)	; Set Digit Timeout to 5 seconds&lt;br /&gt;
exten =&amp;gt; s,n,Set(TIMEOUT(response)=10)	; Set Response Timeout to 10 seconds&lt;br /&gt;
exten =&amp;gt; s,n(restart),BackGround(demo-congrats)	 ; Play a congratulatory message&lt;br /&gt;
exten =&amp;gt; s,n(instruct),BackGround(demo-instruct) ; Play some instructions&lt;br /&gt;
exten =&amp;gt; s,n,WaitExten		; Wait for an extension to be dialed.&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; 2,1,BackGround(demo-moreinfo)	         ; Give some more information.&lt;br /&gt;
exten =&amp;gt; 2,n,Goto(s,instruct)&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; 3,1,Set(LANGUAGE()=fr)		         ; Set language to french&lt;br /&gt;
exten =&amp;gt; 3,n,Goto(s,restart)			 ; Start with the congratulations&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; 1000,1,Goto(default,s,1)&lt;br /&gt;
;&lt;br /&gt;
; We also create an example user, 1234, who is on the console and has&lt;br /&gt;
; voicemail, etc.&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; 1234,1,Playback(transfer,skip)		; &amp;quot;Please hold while...&amp;quot; &lt;br /&gt;
					; (but skip if channel is not up)&lt;br /&gt;
exten =&amp;gt; 1234,n,Macro(stdexten,1234,${CONSOLE})&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; 1235,1,Voicemail(u1234)		; Right to voicemail&lt;br /&gt;
&lt;br /&gt;
exten =&amp;gt; 1236,1,Dial(Console/dsp)		; Ring forever&lt;br /&gt;
exten =&amp;gt; 1236,n,Voicemail(u1234)		; Unless busy&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; # for when they're done with the demo&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; #,1,Playback(demo-thanks)		; &amp;quot;Thanks for trying the demo&amp;quot;&lt;br /&gt;
exten =&amp;gt; #,n,Hangup			        ; Hang them up.&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; A timeout and &amp;quot;invalid extension rule&amp;quot;&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; t,1,Goto(#,1)			        ; If they take too long, give up&lt;br /&gt;
exten =&amp;gt; i,1,Playback(invalid)		        ; &amp;quot;That's not valid, try again&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Create an extension, 500, for dialing the&lt;br /&gt;
; Asterisk demo.&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; 500,1,Playback(demo-abouttotry); Let them know what's going on&lt;br /&gt;
exten =&amp;gt; 500,n,Dial(IAX2/guest@misery.digium.com/s@default)	; Call the Asterisk demo&lt;br /&gt;
exten =&amp;gt; 500,n,Playback(demo-nogo)	; Couldn't connect to the demo site&lt;br /&gt;
exten =&amp;gt; 500,n,Goto(s,6)		; Return to the start over message.&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Create an extension, 600, for evaluating echo latency.&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; 600,1,Playback(demo-echotest)	; Let them know what's going on&lt;br /&gt;
exten =&amp;gt; 600,n,Echo			; Do the echo test&lt;br /&gt;
exten =&amp;gt; 600,n,Playback(demo-echodone)	; Let them know it's over&lt;br /&gt;
exten =&amp;gt; 600,n,Goto(s,6)		; Start over&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Give voicemail at extension 8500&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; 8500,1,VoicemailMain&lt;br /&gt;
exten =&amp;gt; 8500,n,Goto(s,6)&lt;br /&gt;
;&lt;br /&gt;
; Here's what a phone entry would look like (IXJ for example)&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; 1265,1,Dial(Phone/phone0,15)&lt;br /&gt;
;exten =&amp;gt; 1265,n,Goto(s,5)&lt;br /&gt;
&lt;br /&gt;
;[mainmenu]&lt;br /&gt;
;&lt;br /&gt;
; Example &amp;quot;main menu&amp;quot; context with submenu&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; s,1,Answer&lt;br /&gt;
;exten =&amp;gt; s,n,Background(thanks)	; &amp;quot;Thanks for calling press 1 for sales, 2 for support, ...&amp;quot;&lt;br /&gt;
;exten =&amp;gt; s,n,WaitExten&lt;br /&gt;
;exten =&amp;gt; 1,1,Goto(submenu,s,1)&lt;br /&gt;
;exten =&amp;gt; 2,1,Hangup&lt;br /&gt;
;include =&amp;gt; default&lt;br /&gt;
;&lt;br /&gt;
;[submenu]&lt;br /&gt;
;exten =&amp;gt; s,1,Ringing			; Make them comfortable with 2 seconds of ringback&lt;br /&gt;
;exten =&amp;gt; s,n,Wait,2&lt;br /&gt;
;exten =&amp;gt; s,n,Background(submenuopts)	; &amp;quot;Thanks for calling the sales department.  Press 1 for steve, 2 for...&amp;quot;&lt;br /&gt;
;exten =&amp;gt; s,n,WaitExten&lt;br /&gt;
;exten =&amp;gt; 1,1,Goto(default,steve,1)&lt;br /&gt;
;exten =&amp;gt; 2,1,Goto(default,mark,2)&lt;br /&gt;
&lt;br /&gt;
[default]&lt;br /&gt;
;&lt;br /&gt;
; By default we include the demo.  In a production system, you &lt;br /&gt;
; probably don't want to have the demo there.&lt;br /&gt;
;&lt;br /&gt;
include =&amp;gt; demo&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; An extension like the one below can be used for FWD, Nikotel, sipgate etc.&lt;br /&gt;
; Note that you must have a [sipprovider] section in sip.conf&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; _41X.,1,Dial(SIP/${EXTEN:2}@sipprovider,,r)&lt;br /&gt;
&lt;br /&gt;
; Real extensions would go here. Generally you want real extensions to be&lt;br /&gt;
; 4 or 5 digits long (although there is no such requirement) and start with a&lt;br /&gt;
; single digit that is fairly large (like 6 or 7) so that you have plenty of&lt;br /&gt;
; room to overlap extensions and menu options without conflict.  You can alias&lt;br /&gt;
; them with names, too, and use global variables&lt;br /&gt;
&lt;br /&gt;
;exten =&amp;gt; 6245,hint,SIP/Grandstream1&amp;amp;SIP/Xlite1,Joe Schmoe ; Channel hints for presence&lt;br /&gt;
;exten =&amp;gt; 6245,1,Dial(SIP/Grandstream1,20,rt)	; permit transfer&lt;br /&gt;
;exten =&amp;gt; 6245,n(dial),Dial(${HINT},20,rtT)		; Use hint as listed&lt;br /&gt;
;exten =&amp;gt; 6245,n,Voicemail(u6245)		; Voicemail (unavailable)&lt;br /&gt;
;exten =&amp;gt; 6245,s+1,Hangup			; s+1, same as n&lt;br /&gt;
;exten =&amp;gt; 6245,dial+101,Voicemail(b6245)	; Voicemail (busy)&lt;br /&gt;
;exten =&amp;gt; 6361,1,Dial(IAX2/JaneDoe,,rm)		; ring without time limit&lt;br /&gt;
;exten =&amp;gt; 6389,1,Dial(MGCP/aaln/1@192.168.0.14)&lt;br /&gt;
;exten =&amp;gt; 6394,1,Dial(Local/6275/n)		; this will dial ${MARK}&lt;br /&gt;
&lt;br /&gt;
;exten =&amp;gt; 6275,1,Macro(stdexten,6275,${MARK})	; assuming ${MARK} is something like Zap/2&lt;br /&gt;
;exten =&amp;gt; mark,1,Goto(6275|1)			; alias mark to 6275&lt;br /&gt;
;exten =&amp;gt; 6536,1,Macro(stdexten,6236,${WIL})	; Ditto for wil&lt;br /&gt;
;exten =&amp;gt; wil,1,Goto(6236|1)&lt;br /&gt;
;&lt;br /&gt;
; Some other handy things are an extension for checking voicemail via&lt;br /&gt;
; voicemailmain&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; 8500,1,VoicemailMain&lt;br /&gt;
;exten =&amp;gt; 8500,n,Hangup&lt;br /&gt;
;&lt;br /&gt;
; Or a conference room (you'll need to edit meetme.conf to enable this room)&lt;br /&gt;
;&lt;br /&gt;
;exten =&amp;gt; 8600,1,Meetme(1234)&lt;br /&gt;
;&lt;br /&gt;
; Or playing an announcement to the called party, as soon it answers&lt;br /&gt;
;&lt;br /&gt;
;exten = 8700,1,Dial(${MARK},30,A(/path/to/my/announcemsg))&lt;br /&gt;
;&lt;br /&gt;
; For more information on applications, just type &amp;quot;show applications&amp;quot; at your&lt;br /&gt;
; friendly Asterisk CLI prompt.&lt;br /&gt;
;&lt;br /&gt;
; 'show application &amp;lt;command&amp;gt;' will show details of how you&lt;br /&gt;
; use that particular application in this file, the dial plan. &lt;br /&gt;
;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Extconfig</id>
		<title>Extconfig</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Extconfig"/>
				<updated>2007-09-04T13:21:09Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Asterisk external configuration engine is the result of work by Anthony Minessale II, Mark Spencer and Constantine Filin.&lt;br /&gt;
&lt;br /&gt;
It is designed to provide a flexible, seamless integration between Asterisk's internal configuration structure and external SQL other other databases (maybe even LDAP one day).&lt;br /&gt;
&lt;br /&gt;
The external configuration engine is the basis for the ARA, the Asterisk Realtime Architecture (see README.realtime for more information).&lt;br /&gt;
&lt;br /&gt;
'''Configuration'''&lt;br /&gt;
&lt;br /&gt;
External configuration is configured in /etc/asterisk/extconfig.conf allowing you to map any configuration file (static mappings) to be pulled from the database, or to map special runtime entries which permit the dynamic creation of objects, entities, peers, etc. without the necessity of a reload.&lt;br /&gt;
&lt;br /&gt;
Generally speaking, the columns in your tables should line up with the fields you would specify in the given entity declaration.  If an entry would appear more than once, in the column it should be separated by a semicolon. For example, an entity that looks like:&lt;br /&gt;
&lt;br /&gt;
 [foo]&lt;br /&gt;
 host=dynamic&lt;br /&gt;
 secret=bar&lt;br /&gt;
 context=default&lt;br /&gt;
 context=local&lt;br /&gt;
&lt;br /&gt;
could be stored in a table like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+------+--------+-------+--------------+----------+-----+-----------+&lt;br /&gt;
| name | host   | secret| context      | ipaddr   | port| regseconds|&lt;br /&gt;
+------+--------+-------+--------------+----------+-----+-----------+&lt;br /&gt;
| foo  | dynamic|  bar  | default;local| 127.0.0.1| 4569| 1096954152|&lt;br /&gt;
+------+--------+-------+--------------+----------+-----+-----------+&lt;br /&gt;
&lt;br /&gt;
Note that for use with IAX or SIP, the table will also need the &amp;quot;name&amp;quot;, &lt;br /&gt;
&amp;quot;ipaddr&amp;quot;, &amp;quot;port&amp;quot;, &amp;quot;regseconds&amp;quot; columns.  If you wanted to be able to &lt;br /&gt;
configure the callerid, you could just add a callerid column to the &lt;br /&gt;
table, for example.&lt;br /&gt;
&lt;br /&gt;
A SIP table would look more like this:&lt;br /&gt;
&lt;br /&gt;
+------+--------+-------+----------+-----+------------+----------+&lt;br /&gt;
| name | host   | secret| ipaddr   | port| regseconds | username |&lt;br /&gt;
+------+--------+-------+----------+-----+------------+----------+&lt;br /&gt;
| foo  | dynamic|  bar  | 127.0.0.1| 4569| 1096954152 |   1234   |&lt;br /&gt;
+------+--------+-------+----------+-----+------------+----------+&lt;br /&gt;
&lt;br /&gt;
in order to store appropriate parameters required for SIP.&lt;br /&gt;
&lt;br /&gt;
A Voicemail table would look more like this:&lt;br /&gt;
&lt;br /&gt;
+----------+---------+----------+----------+-----------+---------------+&lt;br /&gt;
| uniqueid | mailbox | context  | password |email      |   fullname    | &lt;br /&gt;
+----------+---------+----------+----------+-----------+---------------+&lt;br /&gt;
|        1 |   1234  | default  |  4242    | a@b.com   | Joe Schmoe    | &lt;br /&gt;
+----------+---------+----------+----------+-----------+---------------+&lt;br /&gt;
&lt;br /&gt;
The uniqueid should be unique to each voicemail user and can be &lt;br /&gt;
autoincrement.  It need not have any relation to the mailbox or context.&lt;br /&gt;
&lt;br /&gt;
An extension table would look more like this:&lt;br /&gt;
&lt;br /&gt;
+----------+---------+----------+-------+-----------+&lt;br /&gt;
| context  |  exten  | priority |  app  |  appdata  |&lt;br /&gt;
+----------+---------+----------+-------+-----------+&lt;br /&gt;
|  default |    1234 |        1 |  Dial |     Zap/1 |&lt;br /&gt;
+----------+---------+----------+-------+-----------+&lt;br /&gt;
&lt;br /&gt;
In the dialplan you just use the Realtime switch:&lt;br /&gt;
&lt;br /&gt;
[foo]&lt;br /&gt;
switch =&amp;gt; Realtime&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
&lt;br /&gt;
[bar]&lt;br /&gt;
switch =&amp;gt; Realtime/bar@extensions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example extconfig.conf==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Static and realtime external configuration&lt;br /&gt;
; engine configuration&lt;br /&gt;
;&lt;br /&gt;
; Please read doc/README.extconfig for basic table&lt;br /&gt;
; formatting information.&lt;br /&gt;
;&lt;br /&gt;
[settings]&lt;br /&gt;
;&lt;br /&gt;
; Static configuration files: &lt;br /&gt;
;&lt;br /&gt;
; file.conf =&amp;gt; driver,database[,table]&lt;br /&gt;
;&lt;br /&gt;
; maps a particular configuration file to the given&lt;br /&gt;
; database driver, database and table (or uses the&lt;br /&gt;
; name of the file as the table if not specified)&lt;br /&gt;
;&lt;br /&gt;
;uncomment to load queues.conf via the odbc engine.&lt;br /&gt;
;&lt;br /&gt;
;queues.conf =&amp;gt; odbc,asterisk,ast_config&lt;br /&gt;
;&lt;br /&gt;
; The following files CANNOT be loaded from Realtime storage:&lt;br /&gt;
;	asterisk.conf&lt;br /&gt;
;	extconfig.conf (this file)&lt;br /&gt;
;	logger.conf&lt;br /&gt;
;&lt;br /&gt;
; Additionally, the following files cannot be loaded from&lt;br /&gt;
; Realtime storage unless the storage driver is loaded&lt;br /&gt;
; early using 'preload' statements in modules.conf:&lt;br /&gt;
;	manager.conf&lt;br /&gt;
;	cdr.conf&lt;br /&gt;
;	rtp.conf&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; Realtime configuration engine&lt;br /&gt;
;&lt;br /&gt;
; maps a particular family of realtime&lt;br /&gt;
; configuration to a given database driver,&lt;br /&gt;
; database and table (or uses the name of&lt;br /&gt;
; the family if the table is not specified&lt;br /&gt;
;&lt;br /&gt;
;example =&amp;gt; odbc,asterisk,alttable&lt;br /&gt;
;iaxusers =&amp;gt; odbc,asterisk&lt;br /&gt;
;iaxpeers =&amp;gt; odbc,asterisk&lt;br /&gt;
;sipusers =&amp;gt; odbc,asterisk&lt;br /&gt;
;sippeers =&amp;gt; odbc,asterisk&lt;br /&gt;
;voicemail =&amp;gt; odbc,asterisk&lt;br /&gt;
;extensions =&amp;gt; odbc,asterisk&lt;br /&gt;
;queues =&amp;gt; odbc,asterisk&lt;br /&gt;
;queue_members =&amp;gt; odbc,asterisk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/ENUM</id>
		<title>ENUM</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/ENUM"/>
				<updated>2007-09-04T13:20:39Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: added enumquery.com lookup page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;2005-09-06 &lt;br /&gt;
jtodd@loligo.com&lt;br /&gt;
&lt;br /&gt;
The ENUMLOOKUP function is more complex than it first may appear, and this guide is to give a general overview and set of examples that may be well-suited for the advanced user to evaluate in their consideration of ENUM or ENUM-like lookup strategies. This document assumes a familiarity with ENUM (RFC3761) or ENUM-like methods, as well as familiarity with NAPTR DNS records (RFC2915, RFC3401-3404).&lt;br /&gt;
For an overview of NAPTR records, and the use of NAPTRs in the ENUM global phone-number-to-DNS mapping scheme, please see http://www.voip-info.org/tiki-index.php?page=ENUM for more detail.&lt;br /&gt;
&lt;br /&gt;
A web interface for performing ENUM lookups from any web browser is available at http://enumquery.com/&lt;br /&gt;
&lt;br /&gt;
Using ENUM within Asterisk can be simple or complex, depending on how many failover methods and redundancy procedures you wish to utilize. Implementation of ENUM paths is supposedly defined by the person creating the NAPTR records, but the local administrator may choose to ignore certain NAPTR response methods (URI types) or prefer some over others, which is in contradiction to the RFC.  The ENUMLOOKUP method simply provides administrators a method for determining NAPTR results in either the globally unique ENUM (e164.arpa) DNS tree, or in other ENUM-like DNS trees which are not globally unique.  The methods to actually create channels (&amp;quot;dial&amp;quot;) results given by the ENUMLOOKUP function is then up to the administrator to implement in a way that best suits their environment.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Function: ENUMLOOKUP(&amp;lt;number&amp;gt;[,pointer_type[,options[,zone_suffix]]])&lt;br /&gt;
&lt;br /&gt;
  Performs an ENUM tree lookup on the specified number, method type,&lt;br /&gt;
  and (optionally) ordinal offset, and returns one of four different values:&lt;br /&gt;
&lt;br /&gt;
   1) post-parsed NAPTR of one method (URI) type&lt;br /&gt;
   2) count of elements of one method (URI) type&lt;br /&gt;
   3) count of all method types&lt;br /&gt;
   4) full URI of method at a particular point in the list of all possible methods &lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
&lt;br /&gt;
number = telephone number or search string.  Only numeric values&lt;br /&gt;
within this string are parsed; all other digits are ignored for&lt;br /&gt;
search, but are re-written during NAPTR regexp expansion.&lt;br /&gt;
&lt;br /&gt;
service_type = tel, sip, h323, iax2, mailto, ...[any other string],&lt;br /&gt;
     ALL. Default type is &amp;quot;sip&amp;quot;.&lt;br /&gt;
     Special name of &amp;quot;ALL&amp;quot; will create a list of method types across&lt;br /&gt;
     all NAPTR records for the search number, and then put the results&lt;br /&gt;
     in an ordinal list starting with 1. The position &amp;lt;number&amp;gt;&lt;br /&gt;
     specified will then be returned, starting with 1 as the first&lt;br /&gt;
     record (lowest value) in the list.  The service types are not&lt;br /&gt;
     hardcoded in Asterisk except for the default (sip) if no other&lt;br /&gt;
     service type specified; any method type string (IANA-approved or&lt;br /&gt;
     not) may be used except for the string &amp;quot;ALL&amp;quot;.  &lt;br /&gt;
&lt;br /&gt;
options = optional specifiers.&lt;br /&gt;
    c = count. Returns the number of records of this type are returned&lt;br /&gt;
    (regardless of order or priority.)  If &amp;quot;ALL&amp;quot; is the specified&lt;br /&gt;
    service_type, then a count of all methods will be returned for the&lt;br /&gt;
    DNS record.&lt;br /&gt;
    &amp;lt;integer&amp;gt; = The record in priority/order sequence based on the&lt;br /&gt;
    total count of records passed back by the query. If a service_type&lt;br /&gt;
    is specified, all entries of that type will be sorted into an&lt;br /&gt;
    ordinal list starting with 1 (by order first, then priority).&lt;br /&gt;
    The default of &amp;lt;options&amp;gt; is &amp;quot;1&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
zone_suffix = allows customization of the ENUM zone. Default is e164.arpa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EXAMPLE USES:&lt;br /&gt;
&lt;br /&gt;
Let's use this ENUM list as an example (note that these examples exist&lt;br /&gt;
in the DNS, and will hopefully remain in place as example&lt;br /&gt;
destinations, but they may change or become invalid over time.  The&lt;br /&gt;
end result URIs are not guaranteed to actually work, since some of&lt;br /&gt;
these hostnames or SIP proxies are imaginary.  Of course, the tel:&lt;br /&gt;
replies go to directory assistance for New York City and San&lt;br /&gt;
Francisco...)  Also note that the complex SIP NAPTR at weight 30 will&lt;br /&gt;
strip off the leading &amp;quot;+&amp;quot; from the dialed string if it exists.  This&lt;br /&gt;
is probably a better NAPTR than hard-coding the number into the NAPTR,&lt;br /&gt;
and it is included as a more complex regexp example, though other&lt;br /&gt;
simpler NAPTRs will work just as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
0.2.0.1.1.6.5.1.0.3.1.loligo.com. 3600 IN NAPTR 10 100 &amp;quot;u&amp;quot; &amp;quot;E2U+tel&amp;quot; &amp;quot;!^\\+13015611020$!tel:+12125551212!&amp;quot; .&lt;br /&gt;
0.2.0.1.1.6.5.1.0.3.1.loligo.com. 3600 IN NAPTR 21 100 &amp;quot;u&amp;quot; &amp;quot;E2U+tel&amp;quot; &amp;quot;!^\\+13015611020$!tel:+14155551212!&amp;quot; .&lt;br /&gt;
0.2.0.1.1.6.5.1.0.3.1.loligo.com. 3600 IN NAPTR 25 100 &amp;quot;u&amp;quot; &amp;quot;E2U+sip&amp;quot; &amp;quot;!^\\+13015611020$!sip:2203@sip.fox-den.com!&amp;quot; .&lt;br /&gt;
0.2.0.1.1.6.5.1.0.3.1.loligo.com. 3600 IN NAPTR 26 100 &amp;quot;u&amp;quot; &amp;quot;E2U+sip&amp;quot; &amp;quot;!^\\+13015611020$!sip:1234@sip-2.fox-den.com!&amp;quot; .&lt;br /&gt;
0.2.0.1.1.6.5.1.0.3.1.loligo.com. 3600 IN NAPTR 30 100 &amp;quot;u&amp;quot; &amp;quot;E2U+sip&amp;quot; &amp;quot;!^\\+*([^\\*]*)!sip:\\1@sip-3.fox-den.com!&amp;quot; .&lt;br /&gt;
0.2.0.1.1.6.5.1.0.3.1.loligo.com. 3600 IN NAPTR 55 100 &amp;quot;u&amp;quot; &amp;quot;E2U+mailto&amp;quot; &amp;quot;!^\\+13015611020$!mailto:jtodd@fox-den.com!&amp;quot; .&lt;br /&gt;
&lt;br /&gt;
Example 1: Simplest case, using first SIP return (use all defaults&lt;br /&gt;
except for domain name)&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(+13015611020,,,loligo.com)})&lt;br /&gt;
  returns: ${foo}=&amp;quot;2203@sip.fox-den.com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example 2: What is the first &amp;quot;tel&amp;quot; pointer type for this number?&lt;br /&gt;
(after sorting by order/preference; default of &amp;quot;1&amp;quot; is assumed in&lt;br /&gt;
options field)&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(+13015611020,tel,,loligo.com)})&lt;br /&gt;
  returns: ${foo}=&amp;quot;+12125551212&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example 3: How many &amp;quot;sip&amp;quot; pointer type entries are there for this number?&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(+13015611020,sip,c,loligo.com)})&lt;br /&gt;
  returns: ${foo}=3&lt;br /&gt;
&lt;br /&gt;
Example 4: For all the &amp;quot;tel&amp;quot; pointer type entries, what is the second&lt;br /&gt;
one in the list? (after sorting by preference)&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(+13015611020,tel,2,loligo.com)})&lt;br /&gt;
  returns: ${foo}=&amp;quot;+14155551212&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Example 5: How many NAPTRs (tel, sip, mailto, etc.) are in the list for this number?&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(+13015611020,ALL,c,loligo.com)})&lt;br /&gt;
  returns: ${foo}=6&lt;br /&gt;
&lt;br /&gt;
Example 6: Give back the second full URI in the sorted list of all NAPTR URIs:&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(+13015611020,ALL,2,loligo.com)})&lt;br /&gt;
  returns: ${foo}=&amp;quot;tel:+14155551212&amp;quot;  [note the &amp;quot;tel:&amp;quot; prefix in the string]&lt;br /&gt;
&lt;br /&gt;
Example 7: Look up first SIP entry for the number in the e164.arpa zone (all defaults)&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(+437203001721)})&lt;br /&gt;
  returns: ${foo}=&amp;quot;enum-test@sip.nemox.net&amp;quot;  [note: this result is&lt;br /&gt;
  subject to change as it is &amp;quot;live&amp;quot; DNS and not under my control]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example 8: Look up the ISN mapping in freenum.org alpha test zone&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(1234*256,,,freenum.org)})&lt;br /&gt;
  returns: ${foo}=&amp;quot;1234@204.91.156.10&amp;quot;  [note: this result is subject&lt;br /&gt;
  to change as it is &amp;quot;live&amp;quot; DNS]&lt;br /&gt;
&lt;br /&gt;
Example 9: Give back the first SIP pointer for a number in the&lt;br /&gt;
enum.yoydynelabs.com zone (invalid lookup)&lt;br /&gt;
exten =&amp;gt; 100,1,Set(foo=${ENUMLOOKUP(1234567890,sip,1,enum.yoyodynelabs.com)})&lt;br /&gt;
  returns: ${foo}=&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Usage notes and subtle features:&lt;br /&gt;
&lt;br /&gt;
  a) The use of &amp;quot;+&amp;quot; in lookups is confusing, and warrants further&lt;br /&gt;
  explanation.  All E.164 numbers (&amp;quot;global phone numbers&amp;quot;) by&lt;br /&gt;
  definition need a leading &amp;quot;+&amp;quot; during ENUM lookup.  If you neglect to&lt;br /&gt;
  add a leading &amp;quot;+&amp;quot;, you may discover that numbers that seem to exist&lt;br /&gt;
  in the DNS aren't getting matched by the system or are returned with&lt;br /&gt;
  a null string result.  This is due to the NAPTR reply requiring a&lt;br /&gt;
  &amp;quot;+&amp;quot; in the regular expression matching sequence.  Older versions of&lt;br /&gt;
  Asterisk add a &amp;quot;+&amp;quot; from within the code, which may confuse&lt;br /&gt;
  administrators converting to the new function.  Please ensure that&lt;br /&gt;
  all ENUM (e164.arpa) lookups contain a leading &amp;quot;+&amp;quot; before lookup, so&lt;br /&gt;
  ensure your lookup includes the leading plus sign.  Other DNS trees&lt;br /&gt;
  may or may not require a leading &amp;quot;+&amp;quot; - check before using those&lt;br /&gt;
  trees, as it is possible the parsed NAPTRs will not provide correct&lt;br /&gt;
  results unless you have the correct dialed string.  If you get&lt;br /&gt;
  console messages like &amp;quot;WARNING[24907]: enum.c:222 parse_naptr: NAPTR&lt;br /&gt;
  Regex match failed.&amp;quot; then it is very possible that the returned&lt;br /&gt;
  NAPTR expects a leading &amp;quot;+&amp;quot; in the search string (or the returned&lt;br /&gt;
  NAPTR is mis-formed.)&lt;br /&gt;
&lt;br /&gt;
  b) If a query is performed of type &amp;quot;c&amp;quot; (&amp;quot;count&amp;quot;) and let's say you&lt;br /&gt;
  get back 5 records and then some seconds later a query is made&lt;br /&gt;
  against record 5 in the list, it may not be the case that the DNS&lt;br /&gt;
  resolver has the same answers as it did a second or two ago - maybe&lt;br /&gt;
  there are only 4 records in the list in the newest query.  The&lt;br /&gt;
  resolver should be the canonical storage location for DNS records,&lt;br /&gt;
  since that is the intent of ENUM.  However, some obscure future&lt;br /&gt;
  cases may have wildly changing NAPTR records within several seconds.&lt;br /&gt;
  This is a corner case, and probably only worth noting as a very rare&lt;br /&gt;
  circumstance. (note: I do not object to Asterisk's dnsmgr method of&lt;br /&gt;
  locally caching DNS replies, but this method needs to honor the TTL&lt;br /&gt;
  given by the remote zone master.  Currently, the ENUMLOOKUP function&lt;br /&gt;
  does not use the dnsmgr method of caching local DNS replies.)&lt;br /&gt;
&lt;br /&gt;
  c) If you want strict NAPTR value ordering, then it will be&lt;br /&gt;
  necessary to use the &amp;quot;ALL&amp;quot; method to incrementally step through the&lt;br /&gt;
  different returned NAPTR pointers.  You will need to use string&lt;br /&gt;
  manipulation to strip off the returned method types, since the&lt;br /&gt;
  results will look like &amp;quot;sip:12125551212&amp;quot; in the returned value.&lt;br /&gt;
  This is a non-trivial task, though it is required in order to have&lt;br /&gt;
  strict RFC compliance and to comply with the desires of the remote&lt;br /&gt;
  party who is presenting NAPTRs in a particular order for a reason.&lt;br /&gt;
&lt;br /&gt;
  d) Default behavior for the function (even in event of an error) is&lt;br /&gt;
  to move to the next priority, and the result is a null value.  Most&lt;br /&gt;
  ENUM lookups are going to be failures, and it is the responsibility&lt;br /&gt;
  of the dialplan administrator to manage error conditions within&lt;br /&gt;
  their dialplan.  This is a change from the old app_enumlookup method&lt;br /&gt;
  and it's arbitrary priority jumping based on result type or failure.&lt;br /&gt;
&lt;br /&gt;
  e) Anything other than digits will be ignored in lookup strings.&lt;br /&gt;
  Example: a search string of &amp;quot;+4372030blah01721&amp;quot; will turn into&lt;br /&gt;
  1.2.7.1.0.0.3.0.2.7.3.4.e164.arpa. for the lookup.  The NAPTR&lt;br /&gt;
  parsing may cause unexpected results if there are strings inside&lt;br /&gt;
  your NAPTR lookups.&lt;br /&gt;
&lt;br /&gt;
  f) If there exist multiple records with the same weight and order as&lt;br /&gt;
  a result of your query, the function will RANDOMLY select a single&lt;br /&gt;
  NAPTR from those equal results.&lt;br /&gt;
&lt;br /&gt;
  g) Currently, the function ignores the settings in enum.conf as the&lt;br /&gt;
  search zone name is now specified within the function, and the H323&lt;br /&gt;
  driver can be chosen by the user via the dialplan.  There were no&lt;br /&gt;
  other values in this file, and so it becomes deprecated.&lt;br /&gt;
&lt;br /&gt;
  h) The function will digest and return NAPTRs which use older&lt;br /&gt;
  (depricated) style, reversed method strings such as &amp;quot;sip+E2U&amp;quot;&lt;br /&gt;
  instead of the more modern &amp;quot;E2U+sip&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  i) There is no provision for multi-part methods at this time.  If&lt;br /&gt;
  there are multiple NAPTRs with (as an example) a method of&lt;br /&gt;
  &amp;quot;E2U+voice:sip&amp;quot; and then another NAPTR in the same DNS record with a&lt;br /&gt;
  method of &amp;quot;&amp;quot;E2U+sip&amp;quot;, the system will treat these both as method&lt;br /&gt;
  &amp;quot;sip&amp;quot; and they will be separate records from the perspective of the&lt;br /&gt;
  function.  Of course, if both records point to the same URI and have&lt;br /&gt;
  equal priority/weight (as is often the case) then this will cause no&lt;br /&gt;
  serious difficulty, but it bears mentioning.&lt;br /&gt;
&lt;br /&gt;
  j) ISN (ITAD Subscriber Number) usage:  If the search number is of&lt;br /&gt;
  the form ABC*DEF (where ABC and DEF are at least one numeric digit)&lt;br /&gt;
  then perform an ISN-style lookup where the lookup is manipulated to&lt;br /&gt;
  C.B.A.DEF.domain.tld (all other settings and options apply.)  See&lt;br /&gt;
  http://www.freenum.org/ for more details on ISN lookups.  In the&lt;br /&gt;
  unlikely event you wish to avoid ISN re-writes, put an &amp;quot;n&amp;quot; as the&lt;br /&gt;
  first digit of the search string - the &amp;quot;n&amp;quot; will be ignored for the search.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==EXAMPLES==&lt;br /&gt;
&lt;br /&gt;
All examples below except where noted use &amp;quot;e164.arpa&amp;quot; as the&lt;br /&gt;
referenced domain, which is the default domain name for ENUMLOOKUP.&lt;br /&gt;
All numbers are assumed to not have a leading &amp;quot;+&amp;quot; as dialed by the&lt;br /&gt;
inbound channel, so that character is added where necessary during&lt;br /&gt;
ENUMLOOKUP function calls.&lt;br /&gt;
&lt;br /&gt;
; example 1&lt;br /&gt;
;&lt;br /&gt;
; Assumes North American international dialing (011) prefix.&lt;br /&gt;
; Look up the first SIP result and send the call there, otherwise&lt;br /&gt;
;  send the call out a PRI.  This is the most simple possible&lt;br /&gt;
;  ENUM example, but only uses the first SIP reply in the list of&lt;br /&gt;
;  NAPTR(s). &lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _011.,1,Set(enumresult=${ENUMLOOKUP(+${EXTEN:3})})&lt;br /&gt;
exten =&amp;gt; _011.,n,Dial(SIP/${enumresult})&lt;br /&gt;
exten =&amp;gt; _011.,n,Dial(Zap/g1/${EXTEN})&lt;br /&gt;
; &lt;br /&gt;
; end example 1&lt;br /&gt;
&lt;br /&gt;
; example 2&lt;br /&gt;
;&lt;br /&gt;
; Assumes North American international dialing (011) prefix.&lt;br /&gt;
; Check to see if there are multiple SIP NAPTRs returned by &lt;br /&gt;
;  the lookup, and dial each in order.  If none work (or none&lt;br /&gt;
;  exist) then send the call out a PRI, group 1.&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _011.,1,Set(sipcount=${ENUMLOOKUP(${EXTEN:3},sip,c)}|counter=0)&lt;br /&gt;
exten =&amp;gt; _011.,n,While($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${sipcount}&amp;quot;])&lt;br /&gt;
exten =&amp;gt; _011.,n,Set(counter=$[${counter}+1])&lt;br /&gt;
exten =&amp;gt; _011.,n,Dial(SIP/${ENUMLOOKUP(+${EXTEN:3},sip,${counter})})&lt;br /&gt;
exten =&amp;gt; _011.,n,EndWhile&lt;br /&gt;
exten =&amp;gt; _011.,n,Dial(Zap/g1/${EXTEN})&lt;br /&gt;
;&lt;br /&gt;
; end example 2&lt;br /&gt;
&lt;br /&gt;
; example 3&lt;br /&gt;
;&lt;br /&gt;
; This example expects an ${EXTEN} that is an e.164 number (like&lt;br /&gt;
;  14102241145 or 437203001721)&lt;br /&gt;
; Search through e164.arpa and then also search through e164.org&lt;br /&gt;
;  to see if there are any valid SIP or IAX termination capabilities.&lt;br /&gt;
;  If none, send call out via Zap channel 1.&lt;br /&gt;
;&lt;br /&gt;
; Start first with e164.arpa zone...&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _X.,1,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c)}|counter=0)&lt;br /&gt;
exten =&amp;gt; _X.,2,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${sipcount}&amp;quot;]?3:6)&lt;br /&gt;
exten =&amp;gt; _X.,3,Set(counter=$[${counter}+1])&lt;br /&gt;
exten =&amp;gt; _X.,4,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,${counter})})&lt;br /&gt;
exten =&amp;gt; _X.,5,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${sipcount}&amp;quot;]?3:6)&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _X.,6,Set(iaxcount=${ENUMLOOKUP(+${EXTEN},iax2,c)}|counter=0)&lt;br /&gt;
exten =&amp;gt; _X.,7,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${iaxcount}&amp;quot;]?8:11)&lt;br /&gt;
exten =&amp;gt; _X.,8,Set(counter=$[${counter}+1])&lt;br /&gt;
exten =&amp;gt; _X.,9,Dial(IAX2/${ENUMLOOKUP(+${EXTEN},iax2,${counter})})&lt;br /&gt;
exten =&amp;gt; _X.,10,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${iaxcount}&amp;quot;]?8:11)&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _X.,11,NoOp(&amp;quot;No valid entries in e164.arpa for ${EXTEN} - checking in e164.org&amp;quot;)&lt;br /&gt;
;&lt;br /&gt;
; ...then also try e164.org, and look for SIP and IAX NAPTRs...&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _X.,12,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c,e164.org)}|counter=0)&lt;br /&gt;
exten =&amp;gt; _X.,13,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${sipcount}&amp;quot;]?14:17)&lt;br /&gt;
exten =&amp;gt; _X.,14,Set(counter=$[${counter}+1])&lt;br /&gt;
exten =&amp;gt; _X.,15,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,${counter},e164.org)})&lt;br /&gt;
exten =&amp;gt; _X.,16,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${sipcount}&amp;quot;]?14:17)&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _X.,17,Set(iaxcount=${ENUMLOOKUP(+${EXTEN},iax2,c,e164.org)}|counter=0)&lt;br /&gt;
exten =&amp;gt; _X.,18,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${iaxcount}&amp;quot;]?19:22)&lt;br /&gt;
exten =&amp;gt; _X.,19,Set(counter=$[${counter}+1])&lt;br /&gt;
exten =&amp;gt; _X.,20,Dial(IAX2/${ENUMLOOKUP(+${EXTEN},iax2,${counter},e164.org)})&lt;br /&gt;
exten =&amp;gt; _X.,21,GotoIf($[&amp;quot;${counter}&amp;quot;&amp;lt;&amp;quot;${iaxcount}&amp;quot;]?19:22)&lt;br /&gt;
;&lt;br /&gt;
; ...then send out PRI.&lt;br /&gt;
;&lt;br /&gt;
exten =&amp;gt; _X.,22,NoOp(&amp;quot;No valid entries in e164.org for ${EXTEN} - sending out via Zap&amp;quot;)&lt;br /&gt;
exten =&amp;gt; _X.,23,Dial(Zap/g1/${EXTEN})&lt;br /&gt;
;&lt;br /&gt;
; end example 3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example enum.conf==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; ENUM Configuration for resolving phone numbers over DNS&lt;br /&gt;
;&lt;br /&gt;
; Sample config for Asterisk&lt;br /&gt;
; This file is reloaded at &amp;quot;reload enum&amp;quot; in the CLI&lt;br /&gt;
;&lt;br /&gt;
[general]&lt;br /&gt;
;&lt;br /&gt;
; The search list for domains may be customized.  Domains are searched&lt;br /&gt;
; in the order they are listed here.&lt;br /&gt;
;&lt;br /&gt;
search =&amp;gt; e164.arpa&lt;br /&gt;
;&lt;br /&gt;
; If you'd like to use the E.164.org public ENUM registry in addition&lt;br /&gt;
; to the official e164.arpa one, uncomment the following line&lt;br /&gt;
;&lt;br /&gt;
;search =&amp;gt; e164.org&lt;br /&gt;
;&lt;br /&gt;
; As there are more H323 drivers available you have to select to which&lt;br /&gt;
; drive a H323 URI will map. Default is &amp;quot;H323&amp;quot;.&lt;br /&gt;
;&lt;br /&gt;
h323driver =&amp;gt; H323&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/DUNDi</id>
		<title>DUNDi</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/DUNDi"/>
				<updated>2007-09-04T13:20:08Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.dundi.com&lt;br /&gt;
Mark Spencer, Digium, Inc.&lt;br /&gt;
&lt;br /&gt;
DUNDi is essentially a trusted, peer-to-peer system for being able to call any phone number from the Internet.  DUNDi works by creating a network of nodes called the &amp;quot;DUNDi E.164 Trust Group&amp;quot; which are bound by a common peering agreement known as the General Peering Agreement or GPA.  The GPA legally binds the members of the Trust Group to provide good-faith accurate information to the other nodes on the network, and provides standards by which the community can insure the integrity of the information on the nodes themselves.  Unlike ENUM or similar systems, DUNDi is explicitly designed to preclude any necessity for a single centralized system which could be a source of fees, regulation, etc.&lt;br /&gt;
&lt;br /&gt;
You can find the PEERING agreement in the doc directory.&lt;br /&gt;
&lt;br /&gt;
Much less dramatically, DUNDi can also be used within a private enterprise to share a dialplan efficiently between multiple nodes, without incuring a risk of a single point of failure.  In this way,&lt;br /&gt;
administrators can locally add extensions which become immediately available to the other nodes in the system.&lt;br /&gt;
&lt;br /&gt;
For more information visit http://www.dundi.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Example dundi.conf==&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; DUNDi configuration file&lt;br /&gt;
; &lt;br /&gt;
; For more information about DUNDi, see http://www.dundi.com&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
[general]&lt;br /&gt;
;&lt;br /&gt;
; The &amp;quot;general&amp;quot; section contains general parameters relating&lt;br /&gt;
; to the operation of the dundi client and server.&lt;br /&gt;
;&lt;br /&gt;
; The first part should be your complete contact information&lt;br /&gt;
; should someone else in your peer group need to contact you.&lt;br /&gt;
;&lt;br /&gt;
;department=Your Department&lt;br /&gt;
;organization=Your Company, Inc.&lt;br /&gt;
;locality=Your City&lt;br /&gt;
;stateprov=ST&lt;br /&gt;
;country=US&lt;br /&gt;
;email=your@email.com&lt;br /&gt;
;phone=+12565551212&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; Specify bind address and port number.  Default is&lt;br /&gt;
; 4520&lt;br /&gt;
;&lt;br /&gt;
;bindaddr=0.0.0.0&lt;br /&gt;
;port=4520&lt;br /&gt;
;&lt;br /&gt;
; Our entity identifier (Should generally be the MAC address of the&lt;br /&gt;
; machine it's running on.  Defaults to the first eth address, but you&lt;br /&gt;
; can override it here, as long as you set it to the MAC of *something*&lt;br /&gt;
; you own!)&lt;br /&gt;
;&lt;br /&gt;
;entityid=00:07:E9:3B:76:60&lt;br /&gt;
;&lt;br /&gt;
; Peers shall cache our query responses for the specified time,&lt;br /&gt;
; given in seconds. Default is 3600.&lt;br /&gt;
;&lt;br /&gt;
;cachetime=3600&lt;br /&gt;
;&lt;br /&gt;
; This defines the max depth in which to search the DUNDi system.&lt;br /&gt;
; Note that the maximum time that we will wait for a response is&lt;br /&gt;
; (2000 + 200 * ttl) ms.&lt;br /&gt;
;&lt;br /&gt;
ttl=32&lt;br /&gt;
;&lt;br /&gt;
; If we don't get ACK to our DPDISCOVER within 2000ms, and autokill is set&lt;br /&gt;
; to yes, then we cancel the whole thing (that's enough time for one &lt;br /&gt;
; retransmission only).  This is used to keep things from stalling for a long&lt;br /&gt;
; time for a host that is not available, but would be ill advised for bad &lt;br /&gt;
; connections.  In addition to 'yes' or 'no' you can also specify a number&lt;br /&gt;
; of milliseconds.  See 'qualify' for individual peers to turn on for just&lt;br /&gt;
; a specific peer.&lt;br /&gt;
;&lt;br /&gt;
autokill=yes&lt;br /&gt;
;&lt;br /&gt;
; pbx_dundi creates a rotating key called &amp;quot;secret&amp;quot;, under the family&lt;br /&gt;
; 'secretpath'.  The default family is dundi (resulting in &lt;br /&gt;
; the key being held at dundi/secret).&lt;br /&gt;
;&lt;br /&gt;
;secretpath=dundi&lt;br /&gt;
;&lt;br /&gt;
; The 'storehistory' option (also changeable at runtime with&lt;br /&gt;
; 'dundi store history' and 'dundi no store history') will&lt;br /&gt;
; cause the DUNDi engine to keep track of the last several&lt;br /&gt;
; queries and the amount of time each query took to execute&lt;br /&gt;
; for the purpose of tracking slow nodes.  This option is&lt;br /&gt;
; off by default due to performance impacts.&lt;br /&gt;
;&lt;br /&gt;
;storehistory=yes&lt;br /&gt;
&lt;br /&gt;
[mappings]&lt;br /&gt;
;&lt;br /&gt;
; The &amp;quot;mappings&amp;quot; section maps DUNDi contexts&lt;br /&gt;
; to contexts on the local asterisk system.  Remember&lt;br /&gt;
; that numbers that are made available under the e164 &lt;br /&gt;
; DUNDi context are regulated by the DUNDi General Peering &lt;br /&gt;
; Agreement (GPA) if you are a member of the DUNDi E.164&lt;br /&gt;
; Peering System.&lt;br /&gt;
;&lt;br /&gt;
; dundi_context =&amp;gt; local_context,weight,tech,dest[,options]]&lt;br /&gt;
;&lt;br /&gt;
; 'dundi_context' is the name of the context being requested&lt;br /&gt;
; within the DUNDi request&lt;br /&gt;
;&lt;br /&gt;
; 'local_context' is the name of the context on the local system&lt;br /&gt;
; in which numbers can be looked up for which responses shall be given.&lt;br /&gt;
;&lt;br /&gt;
; 'weight' is the weight to use for the responses provided from this&lt;br /&gt;
; mapping.  The number must be &amp;gt;= 0 and &amp;lt; 60000.  Since it is totally&lt;br /&gt;
; valid to receive multiple responses to a query, responses received&lt;br /&gt;
; with a lower weight are tried first.  Note that the weight has a&lt;br /&gt;
; special meaning in the e164 context - see the GPA for more details.&lt;br /&gt;
;&lt;br /&gt;
; 'tech' is the technology to use (IAX, SIP, H323)&lt;br /&gt;
;&lt;br /&gt;
; 'dest' is the destination to supply for reaching that number.  The&lt;br /&gt;
; following variables can be used in the destination string and will&lt;br /&gt;
; be automatically substituted:&lt;br /&gt;
; ${NUMBER}: The number being requested&lt;br /&gt;
; ${IPADDR}: The IP address to connect to&lt;br /&gt;
; ${SECRET}: The current rotating secret key to be used&lt;br /&gt;
;&lt;br /&gt;
; Further options may include:&lt;br /&gt;
;&lt;br /&gt;
; nounsolicited:  No unsolicited calls of any type permitted via this &lt;br /&gt;
;                 route&lt;br /&gt;
; nocomunsolicit: No commercial unsolicited calls permitted via &lt;br /&gt;
;                 this route&lt;br /&gt;
; residential:    This number is known to be a residence&lt;br /&gt;
; commercial:     This number is known to be a business&lt;br /&gt;
; mobile:         This number is known to be a mobile phone&lt;br /&gt;
; nocomunsolicit: No commercial unsolicited calls permitted via &lt;br /&gt;
;                 this route&lt;br /&gt;
; nopartial:      Do not search for partial matches&lt;br /&gt;
;&lt;br /&gt;
; There *must* exist an entry in mappings for DUNDi to respond&lt;br /&gt;
; to any request, although it may be empty.&lt;br /&gt;
;&lt;br /&gt;
;e164 =&amp;gt; dundi-e164-canonical,0,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial&lt;br /&gt;
;e164 =&amp;gt; dundi-e164-customers,100,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial&lt;br /&gt;
;e164 =&amp;gt; dundi-e164-via-pstn,400,IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nounsolicited,nocomunsolicit,nopartial&lt;br /&gt;
&lt;br /&gt;
;digexten =&amp;gt; default,0,IAX2,guest@lappy/${NUMBER}&lt;br /&gt;
;asdf =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; The remaining sections represent the peers&lt;br /&gt;
; that we fundamentally trust.  The section name&lt;br /&gt;
; represents the name and optionally at a specific&lt;br /&gt;
; DUNDi context if you want the trust to be established&lt;br /&gt;
; for only a specific DUNDi context.&lt;br /&gt;
;&lt;br /&gt;
; inkey - What key they will be authenticating to us with&lt;br /&gt;
;&lt;br /&gt;
; outkey - What key we use to authenticate to them&lt;br /&gt;
;&lt;br /&gt;
; host - What their host is&lt;br /&gt;
;&lt;br /&gt;
; order - What search order to use.  May be 'primary', 'secondary', &lt;br /&gt;
;         'tertiary' or 'quartiary'.  In large systems, it is beneficial&lt;br /&gt;
;         to only query one up-stream host in order to maximize caching&lt;br /&gt;
;         value.  Adding one with primary and one with secondary gives you&lt;br /&gt;
;         redundancy without sacrificing performance.&lt;br /&gt;
;&lt;br /&gt;
; include - Includes this peer when searching a particular context&lt;br /&gt;
;           for lookup (set &amp;quot;all&amp;quot; to perform all lookups with that&lt;br /&gt;
;           host.  This is also the context in which peers are permitted&lt;br /&gt;
;           to precache.&lt;br /&gt;
;&lt;br /&gt;
; noinclude - Disincludes this peer when searching a particular context&lt;br /&gt;
;             for lookup (set &amp;quot;all&amp;quot; to perform no lookups with that&lt;br /&gt;
;             host.&lt;br /&gt;
;&lt;br /&gt;
; permit - Permits this peer to search a given DUNDi context on&lt;br /&gt;
;          the local system.  Set &amp;quot;all&amp;quot; to permit this host to&lt;br /&gt;
;          lookup all contexts.  This is also a context for which&lt;br /&gt;
;          we will create/forward PRECACHE commands.&lt;br /&gt;
;&lt;br /&gt;
; deny -   Denies this peer to search a given DUNDi context on&lt;br /&gt;
;          the local system.  Set &amp;quot;all&amp;quot; to deny this host to&lt;br /&gt;
;          lookup all contexts.&lt;br /&gt;
;&lt;br /&gt;
; model - inbound, outbound, or symmetric for whether we receive &lt;br /&gt;
;         requests only, transmit requests only, or do both.&lt;br /&gt;
;&lt;br /&gt;
; precache - Utilize/Permit precaching with this peer (to pre&lt;br /&gt;
;            cache means to provide an answer when no request&lt;br /&gt;
;            was made and is used so that machines with few&lt;br /&gt;
;            routes can push those routes up a to a higher level).&lt;br /&gt;
;            outgoing means we send precache routes to this peer,&lt;br /&gt;
;            incoming means we permit this peer to send us&lt;br /&gt;
;            precache routes.  symmetric means we do both.&lt;br /&gt;
;&lt;br /&gt;
; Note: You cannot mix symmetric/outbound model with symmetric/inbound&lt;br /&gt;
; precache, nor can you mix symmetric/inbound model with symmetric/outbound&lt;br /&gt;
; precache.&lt;br /&gt;
;&lt;br /&gt;
;&lt;br /&gt;
; The '*' peer is special and matches an unspecified entity&lt;br /&gt;
;&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Sample Primary e164 DUNDi peer&lt;br /&gt;
;&lt;br /&gt;
;[00:50:8B:F3:75:BB]&lt;br /&gt;
;model = symmetric&lt;br /&gt;
;host = 64.215.96.114&lt;br /&gt;
;inkey = digium&lt;br /&gt;
;outkey = misery&lt;br /&gt;
;include = e164&lt;br /&gt;
;permit = e164&lt;br /&gt;
;qualify = yes&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Sample Secondary e164 DUNDi peer&lt;br /&gt;
;&lt;br /&gt;
;[00:A0:C9:96:92:84]&lt;br /&gt;
;model = symmetric&lt;br /&gt;
;host = misery.digium.com&lt;br /&gt;
;inkey = misery&lt;br /&gt;
;outkey = ourkey&lt;br /&gt;
;include = e164&lt;br /&gt;
;permit = e164&lt;br /&gt;
;qualify = yes&lt;br /&gt;
;order = secondary&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Sample &amp;quot;push mode&amp;quot; downstream host&lt;br /&gt;
;&lt;br /&gt;
;[00:0C:76:96:75:28]&lt;br /&gt;
;model = inbound&lt;br /&gt;
;host = dynamic&lt;br /&gt;
;precache = inbound&lt;br /&gt;
;inkey = littleguy&lt;br /&gt;
;outkey = ourkey&lt;br /&gt;
;include = e164	; In this case used only for precaching&lt;br /&gt;
;permit = e164      &lt;br /&gt;
;qualify = yes&lt;br /&gt;
&lt;br /&gt;
;&lt;br /&gt;
; Sample &amp;quot;push mode&amp;quot; upstream host&lt;br /&gt;
;&lt;br /&gt;
;[00:07:E9:3B:76:60]&lt;br /&gt;
;model = outbound&lt;br /&gt;
;precache = outbound&lt;br /&gt;
;host = 216.207.245.34&lt;br /&gt;
;register = yes&lt;br /&gt;
;inkey = dhcp34&lt;br /&gt;
;permit = all ; In this case used only for precaching&lt;br /&gt;
;include = all &lt;br /&gt;
;qualify = yes&lt;br /&gt;
;outkey=foo&lt;br /&gt;
&lt;br /&gt;
;[*]&lt;br /&gt;
;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/CLI</id>
		<title>CLI</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/CLI"/>
				<updated>2007-09-04T13:19:37Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Changing the CLI Prompt'''&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
The CLI prompt is set with the ASTERISK_PROMPT UNIX environment variable that&lt;br /&gt;
you set from the Unix shell before starting Asterisk&lt;br /&gt;
&lt;br /&gt;
You may include the following variables, that will be replaced by&lt;br /&gt;
the current value by Asterisk:&lt;br /&gt;
&lt;br /&gt;
%d	Date (year-month-date)&lt;br /&gt;
%h	Full hostname&lt;br /&gt;
%H	Short hostname&lt;br /&gt;
%t	Time&lt;br /&gt;
%%	Percent sign&lt;br /&gt;
%#	'#' if Asterisk is run in console mode, '&amp;gt;' if running as remote console&lt;br /&gt;
%Cn[;n]	Change terminal foreground (and optional background) color to specified&lt;br /&gt;
	A full list of colors may be found in include/asterisk/term.h&lt;br /&gt;
&lt;br /&gt;
On Linux systems, you may also use&lt;br /&gt;
%l1     Load average over past minute&lt;br /&gt;
%l2     Load average over past 5 minutes&lt;br /&gt;
%l3     Load average over past 15 minutes&lt;br /&gt;
%l4     Process fraction (processes running / total processes)&lt;br /&gt;
%l5     The most recently allocated pid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
04-03-26&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Channel</id>
		<title>Channel</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Channel"/>
				<updated>2007-09-04T13:14:26Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Implementing a Channel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* What is a channel?&lt;br /&gt;
&lt;br /&gt;
A channel is a unit which brings in a call to the Asterisk PBX.  A channel could be connected to a real telephone (like the Internet Phone Jack) or to a logical call (like an Internet phone call).  Asterisk makes no distinction between &amp;quot;FXO&amp;quot; and &amp;quot;FXS&amp;quot; style channels (that is, it doesn't distinguish between telephone lines and telephones).&lt;br /&gt;
&lt;br /&gt;
Every call is placed or received on a distinct channel.  Asterisk uses a channel driver (typically named chan_xxx.so) to support each type of hardware.&lt;br /&gt;
&lt;br /&gt;
* What do I need to create a channel?&lt;br /&gt;
&lt;br /&gt;
In order to support a new piece of hardware you need to write a channel driver.  The easiest way to do so is to look at an existing channel driver and model your own code after it.  &lt;br /&gt;
&lt;br /&gt;
* What's the general architecture?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Typically, a channel reads a configuration file on startup which tells it something about the hardware it's going to be servicing.  Then, it launches a thread which monitors all the idle channels (See the chan_modem or the chan_ixj for an example of this).  When a &amp;quot;RING&amp;quot; or equivalent is detected, the monitoring thread should allocate a channel structure and assign all the callbacks to it (see ixj_new, for example), and then call ast_pbx_start on that channel.  ast_pbx_start will launch a new thread to&lt;br /&gt;
handle the channel as long as the call is up, so once pbx_start has successfully been run, the monitor should no longer monitor that channel. The PBX thread will use the channel, reading, writing, calling, etc., and multiplexing that channel with others using select() on the channel's file descriptor (if your channel doesn't have an associated file descriptor, you'll need to emulate one somehow, perhaps along the lines of what the translator API does with its channel.  &lt;br /&gt;
&lt;br /&gt;
When the PBX is finished with the line, it will hang up the line, at which point it the hardware should again be monitored by the monitoring thread.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/CDR</id>
		<title>CDR</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/CDR"/>
				<updated>2007-09-04T13:14:01Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Asterisk generates Call Detail Records in a database or in a comma separated text file.&lt;br /&gt;
&lt;br /&gt;
* cdr_csv supports comma separated text file storage, this is the default driver&lt;br /&gt;
* cdr_manager supports CDR information via the AMI, The Asterisk Manager interface&lt;br /&gt;
* cdr_odbc supports UnixODBC databases, see http://www.unixodbc.org for an updated list of supported databases, from MySQL to MsSQL and text files.&lt;br /&gt;
* cdr_tds supports FreeTDS databases (Among them MS SQL)&lt;br /&gt;
::NOTE. Please read README.tds for information on possible problems with the FreeTDS driver&lt;br /&gt;
* cdr_sqlite supports SQlite&lt;br /&gt;
* cdr_pgsql supports PostgreSQL&lt;br /&gt;
&lt;br /&gt;
In the asterisk-addons cvs archive, there's a cdr_mysql driver for MySQL.&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    * SetAccount  		Set account code for billing&lt;br /&gt;
    * SetAMAFlags 		Sets AMA flags&lt;br /&gt;
    * NoCDR  			Make sure no CDR is saved for a specific call&lt;br /&gt;
    * ResetCDR  		Reset CDR&lt;br /&gt;
    * ForkCDR 			Save current CDR and start a new CDR for this call&lt;br /&gt;
    * Authenticate 		Authenticates and sets the account code&lt;br /&gt;
    * SetCDRUserField   	Set CDR user field&lt;br /&gt;
    * AppendCDRUserField   	Append data to CDR User field &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For more information, use the &amp;quot;show application&amp;quot; command. You can set default account codes and AMA flags for devices in channel configuration files, like sip.conf, iax.conf etc.&lt;br /&gt;
&lt;br /&gt;
==Fields of the CDR in Asterisk==&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   1. accountcode:	What account number to use, (string, 20 characters)&lt;br /&gt;
   2. src:		Caller*ID number (string, 80 characters)&lt;br /&gt;
   3. dst:		Destination extension (string, 80 characters)&lt;br /&gt;
   4. dcontext:		Destination context (string, 80 characters)&lt;br /&gt;
   5. clid:		Caller*ID with text (80 characters)&lt;br /&gt;
   6. channel:		Channel used (80 characters)&lt;br /&gt;
   7. dstchannel:	Destination channel if appropriate (80 characters)&lt;br /&gt;
   8. lastapp:		Last application if appropriate (80 characters)&lt;br /&gt;
   9. lastdata:		Last application data (arguments) (80 characters)&lt;br /&gt;
  10. start:		Start of call (date/time)&lt;br /&gt;
  11. answer:		Answer of call (date/time)&lt;br /&gt;
  12. end:		End of call (date/time)&lt;br /&gt;
  13. duration:		Total time in system, in seconds (integer), from dial to hangup&lt;br /&gt;
  14. billsec:		Total time call is up, in seconds (integer), from answer to hangup&lt;br /&gt;
  15. disposition:	What happened to the call: ANSWERED, NO ANSWER, BUSY&lt;br /&gt;
  16. amaflags:		What flags to use: DOCUMENTATION, BILL, IGNORE etc, &lt;br /&gt;
      			specified on a per channel basis like accountcode.&lt;br /&gt;
  17. user field:	A user-defined field, maximum 255 characters &lt;br /&gt;
&lt;br /&gt;
In some cases, uniqueid is appended:&lt;br /&gt;
&lt;br /&gt;
    * uniqueid:		Unique Channel Identifier (32 characters) &lt;br /&gt;
      This needs to be enabled in the source code at compile time&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
ONE IMPORTANT NOTE: If you are trying to collect records on IAX to IAX calls you need to be aware that by default, IAX will attempt to transfer calls in this situation (if DTMF is not required).  When the transfer is completed the call is dumped from the middle machine and thus the call detail records&lt;br /&gt;
will report a short call time. If you want detailed records you must turn off IAX transfer, but unless your servers are very close together, you will definitely get a latency hit from doing so.&lt;br /&gt;
&lt;br /&gt;
==CDR Variables==&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
If the channel has a cdr, that cdr record has its own set of variables which can be accessed just like channel variables. The following builtin variables are available.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
${CDR(clid)}			Caller ID&lt;br /&gt;
${CDR(src)}			Source &lt;br /&gt;
${CDR(dst)}			Destination&lt;br /&gt;
${CDR(dcontext)}		Destination context&lt;br /&gt;
${CDR(channel)}			Channel name&lt;br /&gt;
${CDR(dstchannel)}		Destination channel&lt;br /&gt;
${CDR(lastapp)}			Last app executed&lt;br /&gt;
${CDR(lastdata)}		Last app's arguments&lt;br /&gt;
${CDR(start)}			Time the call started.&lt;br /&gt;
${CDR(answer)}			Time the call was answered.&lt;br /&gt;
${CDR(end)}			Time the call ended.&lt;br /&gt;
${CDR(duration)}		Duration of the call.&lt;br /&gt;
${CDR(billsec)}			Duration of the call once it was answered.&lt;br /&gt;
${CDR(disposition)}		ANSWERED, NO ANSWER, BUSY&lt;br /&gt;
${CDR(amaflags)}		DOCUMENTATION, BILL, IGNORE etc&lt;br /&gt;
${CDR(accountcode)}		The channel's account code.&lt;br /&gt;
${CDR(uniqueid)}		The channel's unique id.&lt;br /&gt;
${CDR(userfield)}		The channels uses specified field.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In addition, you can set your own extra variables by using Set(CDR(name)=value). These variables can be output into a text-format CDR by using the cdr_custom CDR driver; see the cdr_custom.conf.sample file in the configs directory for an example of how to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==CSV and MySQL==&lt;br /&gt;
----&lt;br /&gt;
Call data records can be stored in many different databases or even CSV text.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
MSSQL: Asterisk can currently store CDRs into an MSSQL database in two different ways:  cdr_odbc.c or cdr_tds.c&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Call Data Records can be stored using unixODBC (which requires the FreeTDS package) [cdr_odbc.c] or directly by using just the FreeTDS package [cdr_tds.c]  The following provide some examples known to get asterisk working with mssql. NOTE:  Only choose one db connector.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 ODBC [cdr_odbc.c]:&lt;br /&gt;
 Compile, configure, and install the latest unixODBC package:&lt;br /&gt;
 tar -zxvf unixODBC-2.2.9.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 cd unixODBC-2.2.9 &amp;amp;&amp;amp;&lt;br /&gt;
 ./configure --sysconfdir=/etc --prefix=/usr --disable-gui &amp;amp;&amp;amp;&lt;br /&gt;
 make &amp;amp;&amp;amp;&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Compile, configure, and install the latest FreeTDS package:&lt;br /&gt;
 tar -zxvf freetds-0.62.4.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 cd freetds-0.62.4 &amp;amp;&amp;amp;&lt;br /&gt;
 ./configure --prefix=/usr --with-tdsver=7.0 --with-unixodbc=/usr/lib &amp;amp;&amp;amp;&lt;br /&gt;
 make &amp;amp;&amp;amp;&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
Compile, or recompile, asterisk so that it will now add support&lt;br /&gt;
for cdr_odbc.c&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 make clean &amp;amp;&amp;amp;&lt;br /&gt;
 make update &amp;amp;&amp;amp;&lt;br /&gt;
 make &amp;amp;&amp;amp;&lt;br /&gt;
 make install&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Setup odbc configuration files.  These are working examples from my system.  You will need to modify for your setup. You are not required to store usernames or passwords here.&lt;br /&gt;
&lt;br /&gt;
/etc/odbcinst.ini&lt;br /&gt;
 [FreeTDS]&lt;br /&gt;
 Description    = FreeTDS ODBC driver for MSSQL&lt;br /&gt;
 Driver         = /usr/lib/libtdsodbc.so&lt;br /&gt;
 Setup          = /usr/lib/libtdsS.so&lt;br /&gt;
 FileUsage      = 1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/odbc.ini&lt;br /&gt;
 [MSSQL-asterisk]&lt;br /&gt;
 description         = Asterisk ODBC for MSSQL&lt;br /&gt;
 driver              = FreeTDS&lt;br /&gt;
 server              = 192.168.1.25&lt;br /&gt;
 port                = 1433&lt;br /&gt;
 database            = voipdb&lt;br /&gt;
 tds_version         = 7.0&lt;br /&gt;
 language            = us_english&lt;br /&gt;
&lt;br /&gt;
Only install one database connector.  Do not confuse asterisk&lt;br /&gt;
by using both ODBC (cdr_odbc.c) and FreeTDS (cdr_tds.c).&lt;br /&gt;
This command will erase the contents of cdr_tds.conf &lt;br /&gt;
&lt;br /&gt;
 [ -f /etc/asterisk/cdr_tds.conf ] &amp;gt; /etc/asterisk/cdr_tds.conf&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE:  unixODBC requires the freeTDS package, but asterisk does not call freeTDS directly.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Setup cdr_odbc configuration files.  These are working samples from my system.  You will need to modify for your setup. Define your usernames and passwords here, secure file as well.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
/etc/asterisk/cdr_odbc.conf&lt;br /&gt;
 [global]&lt;br /&gt;
 dsn=MSSQL-asterisk&lt;br /&gt;
 username=voipdbuser&lt;br /&gt;
 password=voipdbpass&lt;br /&gt;
 loguniqueid=yes&lt;br /&gt;
&lt;br /&gt;
And finally, create the 'cdr' table in your mssql database.&lt;br /&gt;
&lt;br /&gt;
 CREATE TABLE cdr ( &lt;br /&gt;
  [calldate]      [datetime]              NOT NULL ,&lt;br /&gt;
  [clid]          [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [src]           [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [dst]           [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [dcontext]      [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [channel]       [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [dstchannel]    [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [lastapp]       [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [lastdata]      [varchar] (80)          NOT NULL ,&lt;br /&gt;
  [duration]      [int]                   NOT NULL ,&lt;br /&gt;
  [billsec]       [int]                   NOT NULL ,&lt;br /&gt;
  [disposition]   [varchar] (45)          NOT NULL ,&lt;br /&gt;
  [amaflags]      [int]                   NOT NULL ,&lt;br /&gt;
  [accountcode]   [varchar] (20)          NOT NULL ,&lt;br /&gt;
  [uniqueid]      [varchar] (32)          NOT NULL ,&lt;br /&gt;
  [userfield]     [varchar] (255)         NOT NULL&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
Start asterisk in verbose mode, you should see that asterisk logs a connection to the database and will now record every call to the database when it's complete.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 TDS [cdr_tds.c]:&lt;br /&gt;
 Compile, configure, and install the latest FreeTDS package:&lt;br /&gt;
 tar -zxvf freetds-0.62.4.tar.gz &amp;amp;&amp;amp;&lt;br /&gt;
 cd freetds-0.62.4 &amp;amp;&amp;amp;&lt;br /&gt;
 ./configure --prefix=/usr --with-tdsver=7.0&lt;br /&gt;
 make &amp;amp;&amp;amp;&lt;br /&gt;
 make install&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Compile, or recompile, asterisk so that it will now add support for cdr_tds.c  (Currently only asterisk SVN supports cdr_tds.c)&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 make clean &amp;amp;&amp;amp;&lt;br /&gt;
 make update &amp;amp;&amp;amp;&lt;br /&gt;
 make &amp;amp;&amp;amp;&lt;br /&gt;
 make install&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Only install one database connector.  Do not confuse asterisk by using both ODBC (cdr_odbc.c) and FreeTDS (cdr_tds.c). This command will erase the contents of cdr_odbc.conf&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 [ -f /etc/asterisk/cdr_odbc.conf ] &amp;gt; /etc/asterisk/cdr_odbc.conf&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Setup cdr_tds configuration files.  These are working samples from my system.  You will need to modify for your setup. Define your usernames and passwords here, secure file as well.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 /etc/asterisk/cdr_tds.conf&lt;br /&gt;
 [global]&lt;br /&gt;
 hostname=192.168.1.25&lt;br /&gt;
 port=1433&lt;br /&gt;
 dbname=voipdb&lt;br /&gt;
 user=voipdbuser&lt;br /&gt;
 password=voipdpass&lt;br /&gt;
 charset=BIG5&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
And finally, create the 'cdr' table in your mssql database.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 CREATE TABLE cdr (&lt;br /&gt;
  [accountcode]   [varchar] (20)          NULL ,&lt;br /&gt;
  [src]           [varchar] (80)          NULL ,&lt;br /&gt;
  [dst]           [varchar] (80)          NULL ,&lt;br /&gt;
  [dcontext]      [varchar] (80)          NULL ,&lt;br /&gt;
  [clid]          [varchar] (80)          NULL ,&lt;br /&gt;
  [channel]       [varchar] (80)          NULL ,&lt;br /&gt;
  [dstchannel]    [varchar] (80)          NULL ,&lt;br /&gt;
  [lastapp]       [varchar] (80)          NULL ,&lt;br /&gt;
  [lastdata]      [varchar] (80)          NULL ,&lt;br /&gt;
  [start]         [datetime]              NULL ,&lt;br /&gt;
  [answer]        [datetime]              NULL ,&lt;br /&gt;
  [end]           [datetime]              NULL ,&lt;br /&gt;
  [duration]      [int]                   NULL ,&lt;br /&gt;
  [billsec]       [int]                   NULL ,&lt;br /&gt;
  [disposition]   [varchar] (20)          NULL ,&lt;br /&gt;
  [amaflags]      [varchar] (16)          NULL ,&lt;br /&gt;
  [uniqueid]      [varchar] (32)          NULL&lt;br /&gt;
 )&lt;br /&gt;
&lt;br /&gt;
Start asterisk in verbose mode, you should see that asterisk logs a connection to the database and will now record every call to the database when it's complete.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
MYSQL:&lt;br /&gt;
PGSQL:&lt;br /&gt;
SQLLITE:&lt;br /&gt;
-------------------------------------------------------------------------------&lt;br /&gt;
08/02/2004 : Duane Cox &amp;lt;dcox@illicom.net&amp;gt; - added mssql information&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Backtraces</id>
		<title>Backtraces</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Backtraces"/>
				<updated>2007-09-04T13:13:30Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
This document is to provide information on how to obtain the&lt;br /&gt;
backtraces required on the asterisk bug tracker, available at&lt;br /&gt;
http://bugs.digium.com. The information is required by developers to&lt;br /&gt;
help fix problem with bugs of any kind. Backtraces provide information&lt;br /&gt;
about what was wrong when a program crashed; in our case,&lt;br /&gt;
Asterisk. There are two kind of backtraces (aka 'bt'), which are&lt;br /&gt;
useful: bt and bt full.&lt;br /&gt;
&lt;br /&gt;
First of all, when you start Asterisk, you MUST start it with option&lt;br /&gt;
-g (this tells Asterisk to produce a core file if it crashes).&lt;br /&gt;
&lt;br /&gt;
If you start Asterisk with the safe_asterisk script, it automatically&lt;br /&gt;
starts using the option -g.&lt;br /&gt;
&lt;br /&gt;
If you're not sure if Asterisk is running with the -g option, type the&lt;br /&gt;
following command in your shell:&lt;br /&gt;
&lt;br /&gt;
debian:/tmp# ps aux | grep asterisk&lt;br /&gt;
root     17832  0.0  1.2   2348   788 pts/1    S    Aug12   0:00 /bin/sh /usr/sbin/safe_asterisk&lt;br /&gt;
root     26686  0.0  2.8  15544  1744 pts/1    S    Aug13   0:02 asterisk -vvvg -c&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
The interesting information is located in the last column.&lt;br /&gt;
&lt;br /&gt;
Second, your copy of Asterisk must have been built without&lt;br /&gt;
optimization or the backtrace will be (nearly) unusable. This can be&lt;br /&gt;
done by using 'make dont-optimize' intead of 'make install' to build&lt;br /&gt;
and install the Asterisk binary and modules.&lt;br /&gt;
&lt;br /&gt;
After Asterisk crashes, a core file will be &amp;quot;dumped&amp;quot; in your /tmp/&lt;br /&gt;
directory. To make sure it's really there, you can just type the&lt;br /&gt;
following command in your shell:&lt;br /&gt;
&lt;br /&gt;
debian:/tmp# ls -l /tmp/core.*&lt;br /&gt;
-rw-------  1 root root 10592256 Aug 12 19:40 /tmp/core.26252&lt;br /&gt;
-rw-------  1 root root  9924608 Aug 12 20:12 /tmp/core.26340&lt;br /&gt;
-rw-------  1 root root 10862592 Aug 12 20:14 /tmp/core.26374&lt;br /&gt;
-rw-------  1 root root  9105408 Aug 12 20:19 /tmp/core.26426&lt;br /&gt;
-rw-------  1 root root  9441280 Aug 12 20:20 /tmp/core.26462&lt;br /&gt;
-rw-------  1 root root  8331264 Aug 13 00:32 /tmp/core.26647&lt;br /&gt;
debian:/tmp#&lt;br /&gt;
&lt;br /&gt;
Now that we've verified the core file has been written to disk, the&lt;br /&gt;
final part is to extract 'bt' from the core file. Core files are&lt;br /&gt;
pretty big, don't be scared, it's normal.&lt;br /&gt;
&lt;br /&gt;
*** NOTE: Don't attach core files on the bug tracker, we only need the bt and bt full. ***&lt;br /&gt;
&lt;br /&gt;
For extraction, we use a really nice tool, called gdb. To verify that&lt;br /&gt;
you have gdb installed on your system:&lt;br /&gt;
&lt;br /&gt;
debian:/tmp# gdb -v&lt;br /&gt;
GNU gdb 6.3-debian&lt;br /&gt;
Copyright 2004 Free Software Foundation, Inc.&lt;br /&gt;
GDB is free software, covered by the GNU General Public License, and you are&lt;br /&gt;
welcome to change it and/or distribute copies of it under certain conditions.&lt;br /&gt;
Type &amp;quot;show copying&amp;quot; to see the conditions.&lt;br /&gt;
There is absolutely no warranty for GDB.  Type &amp;quot;show warranty&amp;quot; for details.&lt;br /&gt;
This GDB was configured as &amp;quot;i386-linux&amp;quot;.&lt;br /&gt;
debian:/tmp#&lt;br /&gt;
&lt;br /&gt;
Which is great, we can continue. If you don't have gdb installed, go install gdb.&lt;br /&gt;
&lt;br /&gt;
Now load the core file in gdb, as follows:&lt;br /&gt;
&lt;br /&gt;
debian:/tmp# gdb -se &amp;quot;asterisk&amp;quot; -c /tmp/core.26252&lt;br /&gt;
[...]&lt;br /&gt;
(You would see a lot of output here.)&lt;br /&gt;
[...]&lt;br /&gt;
Reading symbols from /usr/lib/asterisk/modules/app_externalivr.so...done.&lt;br /&gt;
Loaded symbols for /usr/lib/asterisk/modules/app_externalivr.so&lt;br /&gt;
#0  0x29b45d7e in ?? ()&lt;br /&gt;
(gdb)&lt;br /&gt;
&lt;br /&gt;
Now at the gdb prompt, type: bt&lt;br /&gt;
You would see output similar to:&lt;br /&gt;
(gdb) bt&lt;br /&gt;
#0  0x29b45d7e in ?? ()&lt;br /&gt;
#1  0x08180bf8 in ?? ()&lt;br /&gt;
#2  0xbcdffa58 in ?? ()&lt;br /&gt;
#3  0x08180bf8 in ?? ()&lt;br /&gt;
#4  0xbcdffa60 in ?? ()&lt;br /&gt;
#5  0x08180bf8 in ?? ()&lt;br /&gt;
#6  0x180bf894 in ?? ()&lt;br /&gt;
#7  0x0bf80008 in ?? ()&lt;br /&gt;
#8  0x180b0818 in ?? ()&lt;br /&gt;
#9  0x08068008 in ast_stopstream (tmp=0x40758d38) at file.c:180&lt;br /&gt;
#10 0x000000a0 in ?? ()&lt;br /&gt;
#11 0x000000a0 in ?? ()&lt;br /&gt;
#12 0x00000000 in ?? ()&lt;br /&gt;
#13 0x407513c3 in confcall_careful_stream (conf=0x8180bf8, filename=0x8181de8 &amp;quot;Zap/pseudo-1324221520&amp;quot;) at app_meetme.c:262&lt;br /&gt;
#14 0x40751332 in streamconfthread (args=0x8180bf8) at app_meetme.c:1965&lt;br /&gt;
#15 0xbcdffbe0 in ?? ()&lt;br /&gt;
#16 0x40028e51 in pthread_start_thread () from /lib/libpthread.so.0&lt;br /&gt;
#17 0x401ec92a in clone () from /lib/libc.so.6&lt;br /&gt;
(gdb)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The bt's output is the information that we need on the bug tracker.&lt;br /&gt;
&lt;br /&gt;
Now do a bt full as follows:&lt;br /&gt;
(gdb) bt full&lt;br /&gt;
#0  0x29b45d7e in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#1  0x08180bf8 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#2  0xbcdffa58 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#3  0x08180bf8 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#4  0xbcdffa60 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#5  0x08180bf8 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#6  0x180bf894 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#7  0x0bf80008 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#8  0x180b0818 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#9  0x08068008 in ast_stopstream (tmp=0x40758d38) at file.c:180&lt;br /&gt;
No locals.&lt;br /&gt;
#10 0x000000a0 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#11 0x000000a0 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#12 0x00000000 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#13 0x407513c3 in confcall_careful_stream (conf=0x8180bf8, filename=0x8181de8 &amp;quot;Zap/pseudo-1324221520&amp;quot;) at app_meetme.c:262&lt;br /&gt;
        f = (struct ast_frame *) 0x8180bf8&lt;br /&gt;
        trans = (struct ast_trans_pvt *) 0x0&lt;br /&gt;
#14 0x40751332 in streamconfthread (args=0x8180bf8) at app_meetme.c:1965&lt;br /&gt;
No locals.&lt;br /&gt;
#15 0xbcdffbe0 in ?? ()&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#16 0x40028e51 in pthread_start_thread () from /lib/libpthread.so.0&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
#17 0x401ec92a in clone () from /lib/libc.so.6&lt;br /&gt;
No symbol table info available.&lt;br /&gt;
(gdb)&lt;br /&gt;
&lt;br /&gt;
We also need gdb's output. That output gives more details compared to&lt;br /&gt;
the simple &amp;quot;bt&amp;quot;. So we recommend that you use bt full instead of bt.&lt;br /&gt;
But, if you could include both, we appreciate that.&lt;br /&gt;
&lt;br /&gt;
The final &amp;quot;extraction&amp;quot; would the to know all traces by all&lt;br /&gt;
threads. Even if asterisk runs on the same thread for each calls, it&lt;br /&gt;
could have some new threads created.&lt;br /&gt;
&lt;br /&gt;
To make sure we have the correct informations, just do:&lt;br /&gt;
(gdb) thread apply all bt&lt;br /&gt;
&lt;br /&gt;
Thread 1 (process 26252):&lt;br /&gt;
#0  0x29b45d7e in ?? ()&lt;br /&gt;
#1  0x08180bf8 in ?? ()&lt;br /&gt;
#2  0xbcdffa58 in ?? ()&lt;br /&gt;
#3  0x08180bf8 in ?? ()&lt;br /&gt;
#4  0xbcdffa60 in ?? ()&lt;br /&gt;
#5  0x08180bf8 in ?? ()&lt;br /&gt;
#6  0x180bf894 in ?? ()&lt;br /&gt;
#7  0x0bf80008 in ?? ()&lt;br /&gt;
#8  0x180b0818 in ?? ()&lt;br /&gt;
#9  0x08068008 in ast_stopstream (tmp=0x40758d38) at file.c:180&lt;br /&gt;
#10 0x000000a0 in ?? ()&lt;br /&gt;
#11 0x000000a0 in ?? ()&lt;br /&gt;
#12 0x00000000 in ?? ()&lt;br /&gt;
#13 0x407513c3 in confcall_careful_stream (conf=0x8180bf8, filename=0x8181de8 &amp;quot;Zap/pseudo-1324221520&amp;quot;) at app_meetme.c:262&lt;br /&gt;
#14 0x40751332 in streamconfthread (args=0x8180bf8) at app_meetme.c:1965&lt;br /&gt;
#15 0xbcdffbe0 in ?? ()&lt;br /&gt;
#16 0x40028e51 in pthread_start_thread () from /lib/libpthread.so.0&lt;br /&gt;
#17 0x401ec92a in clone () from /lib/libc.so.6&lt;br /&gt;
(gdb)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That output tell us crucial informations for threads.&lt;br /&gt;
&lt;br /&gt;
Now, just create a output.txt and dump your &amp;quot;bt full&amp;quot; (and/or &amp;quot;bt&amp;quot;)&lt;br /&gt;
AND with &amp;quot;thread apply all bt&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Note: Please ATTACH your output, DO NOT paste it as a note.&lt;br /&gt;
&lt;br /&gt;
And you're ready for upload on bug tracker.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Questions or comments regarding this documentation, feel free to pass&lt;br /&gt;
by #asterisk-bugs on FreeNode.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Asterisk_configuration_parser</id>
		<title>Asterisk configuration parser</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Asterisk_configuration_parser"/>
				<updated>2007-09-04T13:12:55Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Asterisk Configuration Parser (version 1.1 and later)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
The Asterisk configuration parser in the 1.1 development version (1.2&lt;br /&gt;
stable) and beyond series has been improved in a number of ways. In&lt;br /&gt;
addition to the realtime architecture, we now have the ability to create&lt;br /&gt;
templates in configuration files, and use these as templates when we&lt;br /&gt;
configure phones, voicemail accounts and queues.&lt;br /&gt;
&lt;br /&gt;
These changes are general to the configuration parser, and works in&lt;br /&gt;
all configuration files. &lt;br /&gt;
&lt;br /&gt;
==General syntax==&lt;br /&gt;
----&lt;br /&gt;
Asterisk configuration files are defined as follows:&lt;br /&gt;
&lt;br /&gt;
 [section]&lt;br /&gt;
 label = value&lt;br /&gt;
 label2 = value&lt;br /&gt;
&lt;br /&gt;
In some files, (e.g. mgcp.conf, zapata.conf and agents.conf), the syntax&lt;br /&gt;
is a bit different. In these files the syntax is as follows:&lt;br /&gt;
	&lt;br /&gt;
 [section]&lt;br /&gt;
 label1 = value1&lt;br /&gt;
 label2 = value2&lt;br /&gt;
 object =&amp;gt; name&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
 label3 = value3&lt;br /&gt;
 label2 = value4&lt;br /&gt;
 object2 =&amp;gt; name2&lt;br /&gt;
&lt;br /&gt;
In this syntax, we create objects with the settings defined above the object&lt;br /&gt;
creation. Note that settings are inherited from the top, so in the example &lt;br /&gt;
above object2 has inherited the setting for &amp;quot;label1&amp;quot; from the first object.&lt;br /&gt;
&lt;br /&gt;
For template configurations, the syntax for defining a section is changed&lt;br /&gt;
to &lt;br /&gt;
 [section](options)&lt;br /&gt;
 label = value&lt;br /&gt;
&lt;br /&gt;
The options field is used to define templates, refer to templates and hide&lt;br /&gt;
templates. Any object can be used as a template.&lt;br /&gt;
&lt;br /&gt;
No whitespace is allowed between the closing &amp;quot;]&amp;quot; and the parenthesis &amp;quot;(&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Comments==&lt;br /&gt;
----&lt;br /&gt;
All lines that starts with semi-colon &amp;quot;;&amp;quot; is treated as comments&lt;br /&gt;
and is not parsed.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;;--&amp;quot; is a marker for a multi-line comment. Everything after&lt;br /&gt;
that marker will be treated as a comment until the end-marker &amp;quot;--;&amp;quot;&lt;br /&gt;
is found. Parsing begins directly after the end-marker.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      ;This is a comment&lt;br /&gt;
      label = value&lt;br /&gt;
      ;-- This is &lt;br /&gt;
       a comment --;&lt;br /&gt;
&lt;br /&gt;
      ;-- Comment --; exten=&amp;gt; 1000,1,dial(SIP/lisa)	&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Including other files==&lt;br /&gt;
----&lt;br /&gt;
In all of the configuration files, you may include the content of another&lt;br /&gt;
file with the #include statement. The content of the other file will be&lt;br /&gt;
included at the row that the #include statement occured.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #include myusers.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You may also include the output of a program with the #exec directive,&lt;br /&gt;
if you enable it in asterisk.conf&lt;br /&gt;
	&lt;br /&gt;
In asterisk.conf, add the execincludes = yes statement in the options&lt;br /&gt;
section:&lt;br /&gt;
 [options]&lt;br /&gt;
 execincludes=yes&lt;br /&gt;
&lt;br /&gt;
The exec directive is used like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 #exec /usr/local/bin/myasteriskconfigurator.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Adding to an existing section==&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 [section] &lt;br /&gt;
 label = value&lt;br /&gt;
&amp;lt;br&amp;gt;	&lt;br /&gt;
 [section](+)&lt;br /&gt;
 label2 = value2	&lt;br /&gt;
&lt;br /&gt;
In this case, the plus sign indicates that the second section (with the&lt;br /&gt;
same name) is an addition to the first section. The second section can&lt;br /&gt;
be in another file (by using the #include statement). If the section&lt;br /&gt;
name referred to before the plus is missing, the configuration will fail&lt;br /&gt;
to load.&lt;br /&gt;
&lt;br /&gt;
==Defining a template-only section==&lt;br /&gt;
----&lt;br /&gt;
 [section](!)&lt;br /&gt;
 label = value&lt;br /&gt;
&lt;br /&gt;
The exclamation mark indicates to the config parser that this is a only&lt;br /&gt;
a template and should not itself be used by the Asterisk module for&lt;br /&gt;
configuration. The section can be inherited by other sections (see &lt;br /&gt;
section &amp;quot;Using templates&amp;quot; below) but is not used by itself.&lt;br /&gt;
&lt;br /&gt;
==Using templates==&lt;br /&gt;
''(or other configuration sections)''&lt;br /&gt;
----&lt;br /&gt;
 [section](name[,name])&lt;br /&gt;
 label = value&lt;br /&gt;
&lt;br /&gt;
The name within the parenthesis refers to other sections, either&lt;br /&gt;
templates or standard sections. The referred sections are included&lt;br /&gt;
before the configuration engine parses the local settings within the&lt;br /&gt;
section as though their entire contents (and anything they were &lt;br /&gt;
previously based upon) were included in the new section.  For example &lt;br /&gt;
consider the following:&lt;br /&gt;
&lt;br /&gt;
 [foo]&lt;br /&gt;
 permit=192.168.0.2&lt;br /&gt;
 host=asdf&lt;br /&gt;
 deny=192.168.0.1&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [bar]&lt;br /&gt;
 permit=192.168.1.2&lt;br /&gt;
 host=jkl&lt;br /&gt;
 deny=192.168.1.1&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [baz](foo,bar)&lt;br /&gt;
 permit=192.168.3.1&lt;br /&gt;
 host=bnm&lt;br /&gt;
&lt;br /&gt;
The [baz] section will be processed as though it had been written in the &lt;br /&gt;
following way:&lt;br /&gt;
&lt;br /&gt;
 [baz]&lt;br /&gt;
 permit=192.168.0.2&lt;br /&gt;
 host=asdf&lt;br /&gt;
 deny=192.168.0.1&lt;br /&gt;
 permit=192.168.1.2&lt;br /&gt;
 host=jkl&lt;br /&gt;
 deny=192.168.1.1&lt;br /&gt;
 permit=192.168.3.1&lt;br /&gt;
 host=bnm&lt;br /&gt;
&lt;br /&gt;
==Additional Examples==&lt;br /&gt;
----&lt;br /&gt;
 (in top-level sip.conf)&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [defaults](!)&lt;br /&gt;
 type=friend&lt;br /&gt;
 nat=yes&lt;br /&gt;
 qualify=on&lt;br /&gt;
 dtmfmode=rfc2833&lt;br /&gt;
 disallow=all&lt;br /&gt;
 allow=alaw&lt;br /&gt;
 #include accounts/*/sip.conf&lt;br /&gt;
 (in accounts/customer1/sip.conf)&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [def-customer1](!,defaults)&lt;br /&gt;
 secret=this_is_not_secret&lt;br /&gt;
 context=from-customer1&lt;br /&gt;
 callerid=Customer 1 &amp;lt;300&amp;gt;&lt;br /&gt;
 accountcode=0001&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [phone1](def-customer1)&lt;br /&gt;
 mailbox=phone1@customer1&lt;br /&gt;
 &amp;lt;br&amp;gt;&lt;br /&gt;
 [phone2](def-customer1)&lt;br /&gt;
 mailbox=phone2@customer1&lt;br /&gt;
&lt;br /&gt;
This example defines two phones - phone1 and phone2 with settings inherited from &amp;quot;def-customer1&amp;quot;.  The &amp;quot;def-customer1&amp;quot; is a template that inherits from &amp;quot;defaults&amp;quot;, which also is a template.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Asterisk_Main</id>
		<title>Asterisk Main</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Asterisk_Main"/>
				<updated>2007-09-04T13:12:24Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;; Below is a sample of the main Asterisk configuration file, asterisk.conf.&lt;br /&gt;
&lt;br /&gt;
Note that this file is '''not''' provided in sample form, because the Makefile creates it when needed and does not touch it when it already exists.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[directories]&lt;br /&gt;
; Make sure these directoriess have the right permissions if not&lt;br /&gt;
; running Asterisk as root &lt;br /&gt;
&lt;br /&gt;
; Where the configuration files (except for this one) are located&lt;br /&gt;
astetcdir =&amp;gt; /etc/asterisk&lt;br /&gt;
&lt;br /&gt;
; Where the Asterisk loadable modules are located&lt;br /&gt;
astmoddir =&amp;gt; /usr/lib/asterisk/modules&lt;br /&gt;
&lt;br /&gt;
; Where additional 'library' elements (scripts, etc.) are located&lt;br /&gt;
astvarlibdir =&amp;gt; /var/lib/asterisk&lt;br /&gt;
&lt;br /&gt;
; Where AGI scripts/programs are located&lt;br /&gt;
astagidir =&amp;gt; /var/lib/asterisk/agi-bin&lt;br /&gt;
&lt;br /&gt;
; Where spool directories are located&lt;br /&gt;
; Voicemail, monitor, dictation and other apps will create files here&lt;br /&gt;
; and outgoing call files (used with pbx_spool) must be placed here&lt;br /&gt;
astspooldir =&amp;gt; /var/spool/asterisk&lt;br /&gt;
&lt;br /&gt;
; Where the Asterisk process ID (pid) file should be created&lt;br /&gt;
astrundir =&amp;gt; /var/run/asterisk&lt;br /&gt;
&lt;br /&gt;
; Where the Asterisk log files should be created&lt;br /&gt;
astlogdir =&amp;gt; /var/log/asterisk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[options]&lt;br /&gt;
;Under &amp;quot;options&amp;quot; you can enter configuration options&lt;br /&gt;
;that you also can set with command line options&lt;br /&gt;
&lt;br /&gt;
verbose = 0					; Verbosity level for logging (-v)&lt;br /&gt;
debug = 3					; Debug: &amp;quot;No&amp;quot; or value (1-4)&lt;br /&gt;
nofork=yes | no					; Background execution disabled (-f)&lt;br /&gt;
console= yes | no				; Console mode (-c)&lt;br /&gt;
highpriority = yes | no				; Execute with high priority (-p)&lt;br /&gt;
initcrypto = yes | no				; Initialize crypto at startup (-i)&lt;br /&gt;
nocolor = yes | no				; Disable ANSI colors (-n)&lt;br /&gt;
dumpcore = yes | no				; Dump core on failure (-g)&lt;br /&gt;
quiet = yes | no				; Run quietly (-q)&lt;br /&gt;
timestamp = yes | no				; Force timestamping on log entries to console (-T)&lt;br /&gt;
runuser = asterisk				; User to run asterisk as (-U) NOTE: will require changes to&lt;br /&gt;
						; directory and device permisions&lt;br /&gt;
rungroup = asterisk				; Group to run asterisk as (-G)&lt;br /&gt;
&lt;br /&gt;
;These options have no command line equivalent&lt;br /&gt;
cache_record_files = yes | no			; Cache record() files in another directory until completion&lt;br /&gt;
record_cache_dir = &amp;lt;dir&amp;gt;&lt;br /&gt;
transcode_via_sln = yes | no 			; Build transcode paths via SLINEAR&lt;br /&gt;
transmit_silence_during_record = yes | no	; send SLINEAR silence while channel is being recorded&lt;br /&gt;
maxload = 1.0					; The maximum load average we accept calls for&lt;br /&gt;
maxcalls = 255					; The maximum number of concurrent calls you want to allow &lt;br /&gt;
execincludes = yes | no 			; Allow #exec entries in configuration files&lt;br /&gt;
dontwarn = yes | no				; Don't over-inform the Asterisk sysadm, he's a guru&lt;br /&gt;
&lt;br /&gt;
[files]&lt;br /&gt;
; Changing the following lines may compromise your security&lt;br /&gt;
; Asterisk.ctl is the pipe that is used to connect the remote CLI&lt;br /&gt;
; (asterisk -r) to Asterisk. Changing these settings change the&lt;br /&gt;
; permissions and ownership of this file. &lt;br /&gt;
; The file is created when Asterisk starts, in the &amp;quot;astrundir&amp;quot; above.&lt;br /&gt;
&lt;br /&gt;
;astctlpermissions = 0660&lt;br /&gt;
;astctlowner = root&lt;br /&gt;
;astctlgroup = asterisk&lt;br /&gt;
;astctl = asterisk.ctl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/AEL</id>
		<title>AEL</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/AEL"/>
				<updated>2007-09-04T13:11:43Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Over time, people have been pushing to add features to extensions.conf to make it more like a programming language.  AEL is intended to provide an actual programming language that can be used to write an Asterisk dialplan.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Getting Started&lt;br /&gt;
----&lt;br /&gt;
The AEL parser (pbx_ael.so) is completely separate from the module that parses extensions.conf (pbx_config.so).  To use AEL, the only thing that has to be done is the module pbx_ael.so must be loaded by Asterisk.  This will be done automatically if using 'autoload=yes' in etc/asterisk/modules.conf.&lt;br /&gt;
&lt;br /&gt;
When the module is loaded, it will look for 'extensions.ael' in /etc/asterisk/. Both extensions.conf and extensions.ael can be used in conjunction with each other if that is what is desired.  Some users may want to keep extensions.conf for the features that are configured in the 'general' section of &lt;br /&gt;
extensions.conf.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reloading extensions.ael&lt;br /&gt;
&lt;br /&gt;
To reload extensions.ael, the following command can be issued at the CLI.&lt;br /&gt;
&lt;br /&gt;
 *CLI&amp;gt; reload pbx_ael.so&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Contexts&lt;br /&gt;
&lt;br /&gt;
Contexts in AEL represent a set of extensions in the same way that they do&lt;br /&gt;
in extensions.conf.&lt;br /&gt;
&lt;br /&gt;
 context default {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Extensions&lt;br /&gt;
&lt;br /&gt;
To specify an extension in a context, the following syntax is used.  If more&lt;br /&gt;
than one application is be called in an extension, they can be listed in order&lt;br /&gt;
inside of a block.&lt;br /&gt;
&lt;br /&gt;
 context default {&lt;br /&gt;
	1234 =&amp;gt; Playback(tt-monkeys);&lt;br /&gt;
	8000 =&amp;gt; {&lt;br /&gt;
		NoOp(one);&lt;br /&gt;
		NoOp(two);&lt;br /&gt;
		NoOp(three);&lt;br /&gt;
	};&lt;br /&gt;
	_5XXX =&amp;gt; NoOp(it's a pattern!);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Includes&lt;br /&gt;
&lt;br /&gt;
Contexts can be included in other contexts.  All included contexts are listed&lt;br /&gt;
within a single block.&lt;br /&gt;
&lt;br /&gt;
 context default {&lt;br /&gt;
	includes {&lt;br /&gt;
		local;&lt;br /&gt;
		longdistance;&lt;br /&gt;
		international;&lt;br /&gt;
	};&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dialplan Switches&lt;br /&gt;
&lt;br /&gt;
Switches are listed in their own block within a context.&lt;br /&gt;
&lt;br /&gt;
 context default {&lt;br /&gt;
	switches {&lt;br /&gt;
		DUNDi/e164;&lt;br /&gt;
		IAX2/box5;&lt;br /&gt;
	};&lt;br /&gt;
	eswitches {&lt;br /&gt;
		IAX2/context@${CURSERVER};&lt;br /&gt;
	};&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Ignorepat&lt;br /&gt;
&lt;br /&gt;
ignorepat can be used to instruct channel drivers to not cancel dialtone upon&lt;br /&gt;
receipt of a particular pattern.  The most commonly used example is '9'.&lt;br /&gt;
&lt;br /&gt;
 context outgoing {&lt;br /&gt;
	ignorepat =&amp;gt; 9;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Variables&lt;br /&gt;
&lt;br /&gt;
Variables in Asterisk do not have a type, so to define a variable, it just has&lt;br /&gt;
to be specified with a value.&lt;br /&gt;
&lt;br /&gt;
Global variables are set in their own block.&lt;br /&gt;
&lt;br /&gt;
globals {&lt;br /&gt;
	CONSOLE=Console/dsp;&lt;br /&gt;
	TRUNK=Zap/g2;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Variables can be set within extensions as well.&lt;br /&gt;
&lt;br /&gt;
 context foo {&lt;br /&gt;
	555 =&amp;gt; {&lt;br /&gt;
		x=5;&lt;br /&gt;
		y=blah;&lt;br /&gt;
		NoOp(x is ${x} and y is ${y} !);&lt;br /&gt;
	};&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Writing to a dialplan function is treated the same as writing to a variable.&lt;br /&gt;
&lt;br /&gt;
 context blah {&lt;br /&gt;
	s =&amp;gt; {&lt;br /&gt;
		CALLERID(name)=ChickenMan;&lt;br /&gt;
		NoOp(My name is ${CALLERID(name)} !);&lt;br /&gt;
	};&lt;br /&gt;
 }; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loops&lt;br /&gt;
&lt;br /&gt;
AEL has implementations of 'for' and 'while' loops.&lt;br /&gt;
&lt;br /&gt;
 context loops {&lt;br /&gt;
	1 =&amp;gt; {&lt;br /&gt;
		for (x=0; ${x} &amp;lt; 3; x=${x} + 1) {&lt;br /&gt;
			Verbose(x is ${x} !);&lt;br /&gt;
		};&lt;br /&gt;
	};&lt;br /&gt;
	2 =&amp;gt; {&lt;br /&gt;
		y=10;&lt;br /&gt;
		while (${y} &amp;gt;= 0) {&lt;br /&gt;
			Verbose(y is ${y} !);&lt;br /&gt;
			y=${y}-1;&lt;br /&gt;
		};&lt;br /&gt;
	};&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conditionals&lt;br /&gt;
&lt;br /&gt;
AEL supports if and switch statements.  Note that if you have an else &lt;br /&gt;
clause, you MUST place braces around the non-else portion of the if &lt;br /&gt;
statement.&lt;br /&gt;
&lt;br /&gt;
 context conditional {&lt;br /&gt;
	_8XXX =&amp;gt; {&lt;br /&gt;
		Dial(SIP/${EXTEN});&lt;br /&gt;
		if (${DIALSTATUS} = &amp;quot;BUSY&amp;quot;) {&lt;br /&gt;
			Voicemail(${EXTEN}|b);&lt;br /&gt;
		} else&lt;br /&gt;
			Voicemail(${EXTEN}|u);&lt;br /&gt;
	};&lt;br /&gt;
	_777X =&amp;gt; {&lt;br /&gt;
		switch (${EXTEN}) {&lt;br /&gt;
			case 7771:&lt;br /&gt;
				NoOp(You called 7771!);&lt;br /&gt;
				break;&lt;br /&gt;
			case 7772:&lt;br /&gt;
				NoOp(You called 7772!);&lt;br /&gt;
				break;&lt;br /&gt;
			case 7773:&lt;br /&gt;
				NoOp(You called 7773!);&lt;br /&gt;
				// fall through&lt;br /&gt;
			default:&lt;br /&gt;
				NoOp(In the default clause!);&lt;br /&gt;
		};&lt;br /&gt;
	};&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
goto and labels&lt;br /&gt;
&lt;br /&gt;
This is an example of how to do a goto in AEL.&lt;br /&gt;
&lt;br /&gt;
 context gotoexample {&lt;br /&gt;
	s =&amp;gt; {&lt;br /&gt;
 begin:&lt;br /&gt;
		NoOp(Infinite Loop!  yay!);&lt;br /&gt;
		Wait(1);&lt;br /&gt;
		goto begin;&lt;br /&gt;
	};&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Macros&lt;br /&gt;
&lt;br /&gt;
A macro is defined in its own block like this.  The arguments to the macro are&lt;br /&gt;
specified with the name of the macro.  They are then reffered to by that same&lt;br /&gt;
name.  A catch block can be specified to catch special extensions.&lt;br /&gt;
&lt;br /&gt;
 macro std-exten( ext , dev ) {&lt;br /&gt;
        Dial(${dev}/${ext},20);&lt;br /&gt;
        switch(${DIALSTATUS) {&lt;br /&gt;
        case BUSY:&lt;br /&gt;
                Voicemail(b${ext});&lt;br /&gt;
                break;&lt;br /&gt;
        default:&lt;br /&gt;
                Voicemail(u${ext});&lt;br /&gt;
        };&lt;br /&gt;
        catch a {&lt;br /&gt;
                VoiceMailMain(${ext});&lt;br /&gt;
                return;&lt;br /&gt;
        };&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 A macro is then called by preceeding the macro name with an ampersand.&lt;br /&gt;
&lt;br /&gt;
 context example {&lt;br /&gt;
	_5XXX =&amp;gt; &amp;amp;std-exten(${EXTEN}, &amp;quot;IAX2&amp;quot;);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 context demo {&lt;br /&gt;
	s =&amp;gt; {&lt;br /&gt;
		Wait(1);&lt;br /&gt;
		Answer();&lt;br /&gt;
		TIMEOUT(digit)=5;&lt;br /&gt;
		TIMEOUT(response)=10;&lt;br /&gt;
 restart:&lt;br /&gt;
		Background(demo-congrats);&lt;br /&gt;
 instructions:&lt;br /&gt;
		for (x=0; ${x} &amp;lt; 3; x=${x} + 1) {&lt;br /&gt;
			Background(demo-instruct);&lt;br /&gt;
			WaitExten();&lt;br /&gt;
		};&lt;br /&gt;
	};&lt;br /&gt;
	2 =&amp;gt; {&lt;br /&gt;
		Background(demo-moreinfo);&lt;br /&gt;
		goto s|instructions;&lt;br /&gt;
	};&lt;br /&gt;
	3 =&amp;gt; {&lt;br /&gt;
		LANGUAGE()=fr;&lt;br /&gt;
		goto s|restart;&lt;br /&gt;
	};&lt;br /&gt;
	500 =&amp;gt; {&lt;br /&gt;
		Playback(demo-abouttotry);&lt;br /&gt;
		Dial(IAX2/guest@misery.digium.com);&lt;br /&gt;
		Playback(demo-nogo);&lt;br /&gt;
		goto s|instructions;&lt;br /&gt;
	};&lt;br /&gt;
	600 =&amp;gt; {&lt;br /&gt;
		Playback(demo-echotest);&lt;br /&gt;
		Echo();&lt;br /&gt;
		Playback(demo-echodone);&lt;br /&gt;
		goto s|instructions;&lt;br /&gt;
	};&lt;br /&gt;
	# =&amp;gt; {&lt;br /&gt;
 hangup:&lt;br /&gt;
		Playback(demo-thanks);&lt;br /&gt;
		Hangup();&lt;br /&gt;
	};&lt;br /&gt;
	t =&amp;gt; goto #|hangup;&lt;br /&gt;
	i =&amp;gt; Playback(invalid);&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Syntax Note'''&lt;br /&gt;
&lt;br /&gt;
Please note that all opening {'s are on the same line as the keyword.  For the time being, that syntax is mandatory.  We are looking at ways to allow other syntax in the future for flexibility, but for now, that is the way you must write AEL clauses.&lt;/div&gt;</summary>
		<author><name>Don.K</name></author>	</entry>

	<entry>
		<id>http://wiki.astripedia.org/index.php/Asterisk_Bookshelf</id>
		<title>Asterisk Bookshelf</title>
		<link rel="alternate" type="text/html" href="http://wiki.astripedia.org/index.php/Asterisk_Bookshelf"/>
				<updated>2007-09-04T12:43:20Z</updated>
		
		<summary type="html">&lt;p&gt;Summary: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[image:asterisk-logo.gif|left|Asterisk]]&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
| __TOC__&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Asterisk Bookshelf : '''Index From Asterisk Main To Zapata'''&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
: The Asterisk Open Source PBX by Mark Spencer and the Asterisk.org developer community.&lt;br /&gt;
: Copyright (C) 2001-2005 Digium, Inc. and other copyright holders.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
==[[Asterisk Main]]==&lt;br /&gt;
; Asterisk Main Configuration&lt;br /&gt;
&lt;br /&gt;
==[[Asterisk configuration parser]]==&lt;br /&gt;
; The Asterisk configuration parser&lt;br /&gt;
&lt;br /&gt;
==[[AEL]]==&lt;br /&gt;
; The Asterisk Extension Language : AEL is intended to provide an actual programming language that can be used to write an Asterisk dialplan&lt;br /&gt;
&lt;br /&gt;
==[[Backtraces]]==&lt;br /&gt;
; how to obtain the backtraces required on the asterisk bug tracker&lt;br /&gt;
&lt;br /&gt;
==[[CDR]]==&lt;br /&gt;
;Asterisk billing support - Call Detail Records : Call data records can be stored in many different databases or even CSV text&lt;br /&gt;
&lt;br /&gt;
==[[Channel]]==&lt;br /&gt;
; Implementing a Channel : A channel unit who brings a call to the Asterisk PBX&lt;br /&gt;
&lt;br /&gt;
==[[CLI]]==&lt;br /&gt;
; Changing the CLI Prompt : The CLI prompt is set with the ASTERISK_PROMPT UNIX environment variable that you set from the Unix shell before starting Asterisk&lt;br /&gt;
&lt;br /&gt;
==[[DUNDi]]==&lt;br /&gt;
; Distributed Universal Number Directory (tm) : is essentially a trusted, peer-to-peer system for being able to call any phone number from the Internet&lt;br /&gt;
&lt;br /&gt;
==[[ENUM]]==&lt;br /&gt;
; consideration of ENUM or ENUM-like lookup strategies&lt;br /&gt;
&lt;br /&gt;
==[[Extconfig]]==&lt;br /&gt;
; Asterisk external configuration : The Asterisk external configuration engine is the result of work by Anthony Minessale II, Mark Spencer and Constantine Filin&lt;br /&gt;
&lt;br /&gt;
==[[Extensions]]==&lt;br /&gt;
;The Asterisk dialplan : extensions.conf&lt;br /&gt;
&lt;br /&gt;
==[[Externalivr]]==&lt;br /&gt;
; Asterisk External IVR Interface : External Interactive Voice Recording&lt;br /&gt;
&lt;br /&gt;
==[[Features]]==&lt;br /&gt;
; Asterisk features as well Parking call-pickup and more&lt;br /&gt;
&lt;br /&gt;
==[[H.323]]==&lt;br /&gt;
; The Asterisk PBX supports H.323 via two totally separate channel drivers&lt;br /&gt;
&lt;br /&gt;
==[[IAX]]==&lt;br /&gt;
; Inter-Asterisk eXchange Protocol&lt;br /&gt;
&lt;br /&gt;
==[[Jitterbuffer]]==&lt;br /&gt;
; Jitterbuffer in Asterisk : The LPC jitterbuffer is to implement it in IAX and SIP/RTP&lt;br /&gt;
&lt;br /&gt;
==[[localchannel]]==&lt;br /&gt;
; The Local channel : The Local channel construct simply loops calls back used to establish dialing into any part of the dialplan&lt;br /&gt;
&lt;br /&gt;
==[[Logging]]==&lt;br /&gt;
; logging to files or to the syslog system&lt;br /&gt;
&lt;br /&gt;
==[[Mathematical]]==&lt;br /&gt;
; Mathematical dialplan function&lt;br /&gt;
&lt;br /&gt;
==[[Manager]]==&lt;br /&gt;
; The Asterisk Manager TCP/IP API - AMI : The Manager interface is a client/server model over TCP and will be able to control the PBX as well as execute Asterisk commands&lt;br /&gt;
&lt;br /&gt;
==[[MeetMe]]==&lt;br /&gt;
; MeetMe simple conference rooms for Asterisk of course&lt;br /&gt;
&lt;br /&gt;
==[[mISDN]]==&lt;br /&gt;
; mISDN Channel Driver for Asterisk PBX : Modular ISDN Channel Driver&lt;br /&gt;
&lt;br /&gt;
==[[Modules]]==&lt;br /&gt;
; Asterisk module configuration&lt;br /&gt;
&lt;br /&gt;
==[[MP3]]==&lt;br /&gt;
; Asterisk MP3 Support&lt;br /&gt;
&lt;br /&gt;
==[[ODBC]]==&lt;br /&gt;
; ODBC Voicemail Storage&lt;br /&gt;
&lt;br /&gt;
==[[Queue]]==&lt;br /&gt;
; Queue Log Information : In order to properly manage ACD queues&lt;br /&gt;
&lt;br /&gt;
==[[SIP]]==&lt;br /&gt;
; SIP Configuration example for Asterisk&lt;br /&gt;
&lt;br /&gt;
==[[SMS]]==&lt;br /&gt;
; The SMS application&lt;br /&gt;
&lt;br /&gt;
==[[Voicemail]]==&lt;br /&gt;
; Voicemail Configuration&lt;br /&gt;
&lt;br /&gt;
==[[Variables]]==&lt;br /&gt;
; Asterisk dial plan variables&lt;br /&gt;
&lt;br /&gt;
==[[Zapata]]==&lt;br /&gt;
; Zapata telephony interface : Zaptel configuration&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>	</entry>

	</feed>