From c8bdb42dcee9000f6b439d36b3941d3643246071 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Sat, 28 Jan 2006 16:22:24 +0000 Subject: [PATCH] Adding applist.xml.dist Fix minor bug in dialplan.php git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@271 06cd67b6-e706-0410-b29e-9de616bca6e9 --- andrew.session | 10 +- andrew.webprj | 14 +- config/applist.xml.dist | 862 ++++++++++++++++++++++++++++++++++++++++++++++++ dialplan.php | 11 +- 4 files changed, 877 insertions(+), 20 deletions(-) create mode 100644 config/applist.xml.dist diff --git a/andrew.session b/andrew.session index 409850ca3..e0931a7a3 100644 --- a/andrew.session +++ b/andrew.session @@ -60,9 +60,10 @@ + - + @@ -73,7 +74,7 @@ - + @@ -113,9 +114,9 @@ - + - + @@ -127,6 +128,7 @@ + diff --git a/andrew.webprj b/andrew.webprj index 590f5699a..565bef8e0 100644 --- a/andrew.webprj +++ b/andrew.webprj @@ -1,6 +1,6 @@ - + -//w3c//dtd xhtml 1.0 strict//en @@ -14,10 +14,7 @@ - - - - + @@ -38,7 +35,7 @@ - + @@ -134,9 +131,10 @@ - + - + + diff --git a/config/applist.xml.dist b/config/applist.xml.dist new file mode 100644 index 000000000..07f72e4e1 --- /dev/null +++ b/config/applist.xml.dist @@ -0,0 +1,862 @@ + + + Say Alpha + SayAlpha(string): Spells the passed string + + + + + Send a FAX file + TxFAX(filename[|option]): Send a given file name as a FAX. Returns -1 +Uses LOCALSTATIONID to identify itself to the remote end. +Sets REMOTESTATIONID to the receiver CSID. +Returns -1 when the user hangs up, or if the file does not exist. +Returns 0 otherwise. + + + + + Enter voicemail system + VoiceMailMain([[s]mailbox][@context]): Enters the main voicemail system +for the checking of voicemail. The mailbox can be passed as the option, +which will stop the voicemail system from prompting the user for the mailbox. +If the mailbox is preceded by 's' then the password check will be skipped. If +the mailbox is preceded by 'p' then the supplied mailbox is prepended to the +user's entry and the resulting string is used as the mailbox number. This is +useful for virtual hosting of voicemail boxes. If a context is specified, +logins are considered in that voicemail context only. +Returns -1 if the user hangs up or 0 otherwise. + + + + + Strip Least Significant Digits + StripLSD(count): Strips the trailing 'count' digits from the channel's +associated extension. For example, the number 5551212 when stripped with a +count of 4 would be changed to 555. This app always returns 0, and the PBX +will continue processing at the next priority for the *new* extension. + So, for example, if priority 3 of 5551212 is StripLSD 4, the next step +executed will be priority 4 of 555. If you switch into an extension which +has no first step, the PBX will treat it as though the user dialed an +invalid extension. + + + + + Change monitoring filename of a channel + ChangeMonitor(filename_base) +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. + + + + + Background a file with talk detect + BackgroundDetect(filename[|sil[|min|[max]]]): Plays back a given +filename, waiting for interruption from a given digit (the digit must +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 +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. Returns -1 on hangup, and 0 on successful playback +completion with no exit conditions. + + + + + Say Number + SayNumber(digits[,gender]): Says the passed number. SayNumber is using +the current language setting for the channel. (See app SetLanguage). + + + + + Provide directory of voicemail extensions + Directory(vm-context[|dial-context[|options]]): Presents the user with a directory +of extensions from which they may select by name. The list of names +and extensions is discovered from voicemail.conf. The vm-context argument +is required, and specifies the context of voicemail.conf to use. The +dial-context is the context to use for dialing the users, and defaults to +the vm-context if unspecified. The 'f' option causes the directory to match +based on the first name in voicemail.conf instead of the last name. +Returns 0 unless the user hangs up. It also sets up the channel on exit +to enter the extension the user selected. + + + + + Set CallerID + SetCallerID(clid[|a]): Set Caller*ID on a call to a new +value. Sets ANI as well if a flag is used. Always returns 0 + + + + + Indicate congestion and stop + Congestion([timeout]): Requests that the channel indicate congestion +and then waits for the user to hang up or for the optional timeout to +expire. Always returns -1. + + + + Indicate busy condition and stop + Busy([timeout]): Requests that the channel indicate busy condition and +then waits for the user to hang up or the optional timeout to expire. +Always returns -1. + + + + Park yourself + Park(exten):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. + + + + + Leave a voicemail message + VoiceMail([s|u|b]extension[@context][&extension[@context]][...]): Leavesvoicemail for a given extension (must be configured in voicemail.conf). + If the extension is preceded by +* 's' then instructions for leaving the message will be skipped. +* 'u' then the "unavailable" message will be played. + (/var/lib/asterisk/sounds/vm/<exten>/unavail) if it exists. +* 'b' then the the busy message will be played (that is, busy instead of unavail). +If the caller presses '0' (zero) during the prompt, the call jumps to +extension 'o' in the current context. +If the caller presses '*' during the prompt, the call jumps to +extension 'a' in the current context. +If the requested mailbox does not exist, and there exists a priority +n + 101, then that priority will be taken next. +When multiple mailboxes are specified, the unavailable or busy message +will be taken from the first mailbox specified. +Returns -1 on error or mailbox not found, or if the user hangs up. +Otherwise, it returns 0. + + + + + Waits for some time + Wait(seconds): Waits for a specified number of seconds, then returns 0. +seconds can be passed with fractions of a second. (eg: 1.5 = 1.5 seconds) + + + + + Change the presentation for the callerid + Callingpres(number): Changes the presentation for the callerid. Should be called before placing an outgoing call + + + + + Play Music On Hold indefinitely + MusicOnHold(class): 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. +Never returns otherwise. + + + + + Set absolute maximum time of call + AbsoluteTimeout(seconds): Set the absolute maximum amount of time permitted +for a call. A setting of 0 disables the timeout. Always returns 0. + + + + + Enter voicemail system + VoiceMailMain([[s]mailbox][@context]): Enters the main voicemail system +for the checking of voicemail. The mailbox can be passed as the option, +which will stop the voicemail system from prompting the user for the mailbox. +If the mailbox is preceded by 's' then the password check will be skipped. If +the mailbox is preceded by 'p' then the supplied mailbox is prepended to the +user's entry and the resulting string is used as the mailbox number. This is +useful for virtual hosting of voicemail boxes. If a context is specified, +logins are considered in that voicemail context only. +Returns -1 if the user hangs up or 0 otherwise. + + + + + Play a file while awaiting extension + Background(filename[|options[|langoverride]]): Plays a given file, while simultaneously +waiting for the user to begin typing an extension. The timeouts do not +count until the last BackGround application has ended. +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 channel will +be answered before the sound is played. Not all channels support playing +messages while still hook. The 'langoverride' may be a language to use for +playing the prompt which differs from the current language of the channel +Returns -1 if the channel was hung up, or if the file does not exist. +Returns 0 otherwise. + + + + + Send arbitrary text to verbose output + Verbose([<level>|]<message>) + level must be an integer value. If not specified, defaults to 0. Always returns 0. + + + + + Stop monitoring a channel + StopMonitor +Stops monitoring a channel. Has no effect if the channel is not monitored + + + + + (Deprecated) Save substring digits in a given variable + (Deprecated, use ${variable:a:b} instead) + + SubString(variable=string_of_digits|count1|count2): Assigns the substring +of string_of_digits to a given variable. Parameter count1 may be positive +or negative. If it's positive then we skip the first count1 digits from the +left. If it's negative, we move count1 digits counting from the end of +the string to the left. Parameter count2 implies how many digits we are +taking from the point that count1 placed us. If count2 is negative, then +that many digits are omitted from the end. +For example: +exten => _NXXXXXX,1,SubString,test=2564286161|0|3 +assigns the area code (3 first digits) to variable test. +exten => _NXXXXXX,1,SubString,test=2564286161|-7|7 +assigns the last 7 digits to variable test. +exten => _NXXXXXX,1,SubString,test=2564286161|0|-4 +assigns all but the last 4 digits to variable test. +If there are no parameters it'll return with -1. +If there wrong parameters it go on and return with 0 + + + + + MeetMe participant count + MeetMeCount(confno[|var]): Plays back the number of users in the specifiedi +MeetMe conference. If var is specified, playback will be skipped and the value +will be returned in the variable. Returns 0 on success or -1 on a hangup. +A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY. + + + + + Set CallerID Name + SetCIDName(cname[|a]): Set Caller*ID Name on a call to a new +value, while preserving the original Caller*ID number. This is +useful for providing additional information to the called +party. Sets ANI as well if a flag is used. Always returns 0 + + + + + Flashes a Zap Trunk + Flash(): 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 otherwise. Returns 0 on success or -1 if this is not +a zap trunk + + + + + Append trailing digits + Suffix(digits): Appends the digit string specified by digits to the +channel's associated extension. For example, the number 555 when suffixed +with '1212' will become 5551212. This app always returns 0, and the PBX will +continue processing at the next priority for the *new* extension. + So, for example, if priority 3 of 555 is Suffix 1212, the next step +executed will be priority 4 of 5551212. If you switch into an extension +which has no first step, the PBX will treat it as though the user dialed an +invalid extension. + + + + + Sets account code + SetAccount([account]): Set the channel account code for billing +purposes. Always returns 0. + + + + + Say Phonetic + SayPhonetic(string): Spells the passed string with phonetic alphabet + + + + + Monitor a channel + Monitor([file_format|[fname_base]|[options]]): +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. + file_format optional, if not set, defaults to "wav" + fname_base if set, changes the filename used to the one specified. + options: + m - when the recording ends mix the two leg files into one and + delete the two leg files. If the variable MONITOR_EXEC is set, the + application referenced in it will be executed instead of + soxmix and the raw leg files will NOT be deleted automatically. + soxmix or MONITOR_EXEC is handed 3 arguments, the two leg files + and a target mixed file name which is the same as the leg file names + only without the in/out designator. + If MONITOR_EXEC_ARGS is set, the contents will be passed on as + additional arguements to MONITOR_EXEC + Both MONITOR_EXEC and the Mix flag can be set from the + administrator interface + + b - Don't begin recording unless a call is bridged to another channel + +Returns -1 if monitor files can't be opened or if the channel is already +monitored, otherwise 0. + + + + + Wait, playing Music On Hold + WaitMusicOnHold(delay): 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. + + + + + Answer a channel if ringing + Answer(): If the channel is ringing, answer it, otherwise do nothing. +Returns 0 unless it tries to answer the channel and fails. + + + + + Echo audio read back to the user + Echo(): Echo audio read from channel back to the channel. Returns 0 +if the user exits with the '#' key, or -1 if the user hangs up. + + + + + Say Digits + SayDigits(digits): Says the passed digits. SayDigits is using the +current language setting for the channel. (See app setLanguage) + + + + + Check if vmbox exists + MailboxExists(mailbox[@context]): Conditionally branches to priority n+101 +if the specified voice mailbox exists. + + + + + Goto a particular priority, extension, or context + Goto([[context|]extension|]priority): Set the priority to the specified +value, optionally setting the extension and optionally the context as well. +The extension BYEXTENSION is special in that it uses the current extension, +thus permitting you to go to a different context, without specifying a +specific extension. Always returns 0, even if the given context, extension, +or priority is invalid. + + + + + MeetMe conference bridge + MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe conference. +If the conference number is omitted, the user will be prompted to enter +one. +MeetMe returns 0 if user pressed # to exit (see option 'p'), otherwise -1. +Please note: A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING TO WORK! + +The option string may contain zero or more of the following characters: + 'm' -- set monitor only mode (Listen only, no talking) + 't' -- set talk only mode. (Talk only, no listening) + 'p' -- allow user to exit the conference by pressing '#' + 'X' -- allow user to exit the conference by entering a valid single + digit extension ${MEETME_EXIT_CONTEXT} or the current context + if that variable is not defined. + 'd' -- dynamically add conference + 'D' -- dynamically add conference, prompting for a PIN + 'e' -- select an empty conference + 'E' -- select an empty pinless conference + 'v' -- video mode + 'q' -- quiet mode (don't play enter/leave sounds) + 'M' -- enable music on hold when the conference has a single caller + 'x' -- close the conference when last marked user exits + 'w' -- wait until the marked user enters the conference + 'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND} + Default: conf-background.agi + (Note: This does not work with non-Zap channels in the same conference) + 's' -- Present menu (user or admin) when '*' is received ('send' to menu) + 'a' -- set admin mode + 'A' -- set marked mode + + + + + Set global variable to value + SetGlobalVar(#n=value): Sets global variable n to value. Global +variable are available across channels. + + + + + Soft Hangup Application + SoftHangup(Technology/resource) +Hangs up the requested channel. Always returns 0 + + + + + Set the CDR user field + [Synopsis] +SetCDRUserField(value) + +[Description] +SetCDRUserField(value): 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(). + Always returns 0 + + + + + Indicate ringing tone + Ringing(): Request that the channel indicate ringing tone to the user. +Always returns 0. + + + + + Execute a system command + System(command): Executes a command by using system(). Returns -1 on +failure to execute the specified command. 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 returns 0. + + + + + Leave a voicemail message + VoiceMail([s|u|b]extension[@context][&extension[@context]][...]): Leavesvoicemail for a given extension (must be configured in voicemail.conf). + If the extension is preceded by +* 's' then instructions for leaving the message will be skipped. +* 'u' then the "unavailable" message will be played. + (/var/lib/asterisk/sounds/vm/<exten>/unavail) if it exists. +* 'b' then the the busy message will be played (that is, busy instead of unavail). +If the caller presses '0' (zero) during the prompt, the call jumps to +extension 'o' in the current context. +If the caller presses '*' during the prompt, the call jumps to +extension 'a' in the current context. +If the requested mailbox does not exist, and there exists a priority +n + 101, then that priority will be taken next. +When multiple mailboxes are specified, the unavailable or busy message +will be taken from the first mailbox specified. +Returns -1 on error or mailbox not found, or if the user hangs up. +Otherwise, it returns 0. + + + + + Set maximum timeout between digits + 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. +Always returns 0. + + + + + Scan Zap channels to monitor calls + ZapScan allows a call center manager to monitor Zap channels in +a convenient way. Use '#' to select the next channel and use '*' to exit + + + + + Try executing a system command + TrySystem(command): Executes a command by using system(). Returns 0 +on any situation. 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 returns 0. + + + + + Sets AMA Flags + SetAMAFlags([flag]): Set the channel AMA Flags for billing +purposes. Always returns 0. + + + + + Wait for Ring Application + 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 + + + + + Prepend leading digits + Prefix(digits): Prepends the digit string specified by digits to the +channel's associated extension. For example, the number 1212 when prefixed +with '555' will become 5551212. This app always returns 0, and the PBX will +continue processing at the next priority for the *new* extension. + So, for example, if priority 3 of 1212 is Prefix 555, the next step +executed will be priority 4 of 5551212. If you switch into an extension +which has no first step, the PBX will treat it as though the user dialed an +invalid extension. + + + + + Append to the CDR user field + [Synopsis] +AppendCDRUserField(value) + +[Description] +AppendCDRUserField(value): 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(). + Always returns 0 + + + + + Lookup caller name from TXT record + TXTLookup(CallerID): 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. + + + + + Receive a FAX to a file + RxFAX(filename): Receives a FAX from the channel into a +given filename. If the file exists it will be overwritten. The file +should be in TIFF/F format. +Uses LOCALSTATIONID to identify itself to the remote end. + LOCALHEADERINFO to generate a header line on each page. +Sets REMOTESTATIONID to the sender CSID. + FAXPAGES to the number of pages received. + FAXBITRATE to the transmition rate. + FAXRESOLUTION to the resolution. +Returns -1 when the user hangs up. + + + + + Transfer caller to remote extension + Transfer(exten): Requests the remote caller be transferred to +a given extension. Returns -1 on hangup, or 0 on completion +regardless of whether the transfer was successful. If the transfer +was *not* supported or successful and there exists a priority n + 101, +then that priority will be taken next. + + + + + Set default Music On Hold class + SetMusicOnHold(class): 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. + + + + + MeetMe conference Administration + MeetMeAdmin(confno,command[,user]): Run admin command for conference + 'K' -- Kick all users out of conference + 'k' -- Kick one user out of conference + 'L' -- Lock conference + 'l' -- Unlock conference + 'M' -- Mute conference + 'm' -- Unmute conference + + + + + Set variable to value + Setvar(#n=value): Sets channel specific variable n to value + + + + Record to a file + Record(filename:format|silence[|maxduration][|option]) + +Records from the channel into a given filename. If the file exists it will +be overwritten. +- 'format' is the format of the file type to be recorded (wav, gsm, etc). +- 'silence' is the number of seconds of silence to allow before returning. +- 'maxduration' is the maximum recording duration in seconds. If missing +or 0 there is no maximum. +- 'option' may be 'skip' to return immediately if the line is not up, +or 'noanswer' to attempt to record even if the line is not up. + +If filename contains '%d', these characters will be replaced with a number +incremented by one each time the file is recorded. + +Formats: g723, g729, gsm, h263, ulaw, alaw, vox, wav, WAV + +User can press '#' to terminate the recording and continue to the next priority. + +Returns -1 when the user hangs up. + + + + + Set CallerID Number + SetCIDNum(cnum[|a]): Set Caller*ID Number on a call to a new +value, while preserving the original Caller*ID name. This is +useful for providing additional information to the called +party. Sets ANI as well if a flag is used. Always returns 0 + + + + + Resets the Call Data Record + ResetCDR([options]): Causes the Call Data Record to be reset, optionally +storing the current CDR before zeroing it out (if 'w' option is specifed). +record WILL be stored. +Always returns 0. + + + + + Play a file + Playback(filename[|option]): Plays back a given filename (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 channel will +be answered before the sound is played. Not all channels support playing +messages while still hook. Returns -1 if the channel was hung up, or if the +file does not exist. Returns 0 otherwise. + + + + + Macro Implementation + Macro(macroname|arg1|arg2...): Executes a macro using the context +'macro-<macroname>', 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. Arguments become +${ARG1}, ${ARG2}, etc in the macro context. Macro returns -1 if +any step in the macro returns -1, and 0 otherwise. If you Goto out +of the Macro context, the Macro will terminate and control will be return +at the location of the Goto. Otherwise 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. + + + + + Change the dtmfmode for a SIP call + SIPDtmfMode(inband|info|rfc2833): Changes the dtmfmode for a SIP call + + + + + Waits for some time + Wait(seconds): Waits for the user to enter a new extension for the +specified number of seconds, then returns 0. Seconds can be passed with +fractions of a second. (eg: 1.5 = 1.5 seconds) + + + + + Place a call and connect to the current channel + Dial(Technology/resource[&Technology2/resource2...][|timeout][|options][|URL]): +Requests one or more channels and places specified outgoing calls on them. +As soon as a channel answers, the Dial app will answer the originating +channel (if it needs to be answered) and will bridge a call with the channel +which first answered. All other calls placed by the Dial app will be hung up +If a timeout is not specified, the Dial application will wait indefinitely +until either one of the called channels answers, the user hangs up, or all +channels return busy or error. In general, the dialer will return 0 if it +was unable to place the call, or the timeout expired. However, if all +channels were busy, and there exists an extension with priority n+101 (where +n is the priority of the dialer instance), then it will be the next +executed extension (this allows you to setup different behavior on busy from +no-answer). + This application returns -1 if the originating channel hangs up, or if the +call is bridged and either of the parties in the bridge terminate the call. +The option string may contain zero or more of the following characters: + 't' -- allow the called user transfer the calling user by hitting #. + 'T' -- allow the calling user to transfer the call by hitting #. + 'f' -- Forces callerid to be set as the extension of the line + making/redirecting the outgoing call. For example, some PSTNs + don't allow callerids from other extensions then the ones + that are assigned to you. + 'r' -- indicate ringing to the calling party, pass no audio until answered. + 'm' -- provide hold music to the calling party until answered. + 'M(x) -- Executes the macro (x) upon connect of the call + 'h' -- allow callee to hang up by hitting *. + 'H' -- allow caller to hang up by hitting *. + 'C' -- reset call detail record for this call. + 'P[(x)]' -- privacy mode, using 'x' as database if provided. + 'g' -- goes on in context if the destination channel hangs up + 'e' -- Force the caller to Explicitly accept the call + 'A(x)' -- play an announcement to the called party, using x as file + 'S(x)' -- hangup the call after x seconds AFTER called party picked up + 'D([digits])' -- Send DTMF digit string *after* called party has answered + but before the bridge. (w=500ms sec pause) + 'L(x[:y][:z])' -- Limit the call to 'x' ms warning when 'y' ms are left + repeated every 'z' ms) Only 'x' is required, 'y' and 'z' are optional. + The following special variables are optional: + * LIMIT_PLAYAUDIO_CALLER yes|no (default yes) + Play sounds to the caller. + * LIMIT_PLAYAUDIO_CALLEE yes|no + Play sounds to the callee. + * LIMIT_TIMEOUT_FILE File to play when time is up. + * LIMIT_CONNECT_FILE File to play when call begins. + * LIMIT_WARNING_FILE File to play as warning if 'y' is defined. + 'timeleft' is a special sound macro to auto-say the time + left and is the default. + + In addition to transferring the call, a call may be parked and then picked +up by another user. + The optional URL will be sent to the called party if the channel supports it. + This application sets the following channel variables upon completion: + DIALEDTIME Time from dial to answer + ANSWEREDTIME Time for actual call + DIALSTATUS The status of the call as a text string, one of + CHANUNAVAIL | CONGESTION | NOANSWER | BUSY | ANSWER | CANCEL + + + + + Answer a parked call + ParkedCall(exten):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. + + + + + Set maximum timeout awaiting response + ResponseTimeout(seconds): Set the maximum amount of time permitted after +falling through a series of priorities for a channel in which the user may +begin typing an extension. If the user does not type an extension in this +amount of time, control will pass to the 't' extension if it exists, and +if not the call would be terminated. The default timeout is 10 seconds. +Always returns 0. + + + + + Unconditional hangup + Hangup(): Unconditionally hangs up a given channel by returning -1 always. + + + + + Conditional goto on current time + GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[[context|]extension|]pri): +If the current time matches the specified time, then branch to the specified +extension. Each of the elements may be specified either as '*' (for always) +or as a range. See the 'include' syntax for details. + + + + No operation + NoOp(): No-operation; Does nothing. + + + + Set CallerID Presentation + SetCallerPres(presentation): Set Caller*ID presentation on +a call to a new value. Sets ANI as well if a flag is used. +Always returns 0. Valid presentations are: + + allowed_not_screened : Presentation Allowed, Not Screened + allowed_passed_screen : Presentation Allowed, Passed Screen + allowed_failed_screen : Presentation Allowed, Failed Screen + allowed : Presentation Allowed, Network Number + prohib_not_screened : Presentation Prohibited, Not Screened + prohib_passed_screen : Presentation Prohibited, Passed Screen + prohib_failed_screen : Presentation Prohibited, Failed Screen + prohib : Presentation Prohibited, Network Number + unavailable : Number Unavailable + + + + + + Sets user language + SetLanguage(language): Set the channel language to 'language'. This +information is used for the syntax in generation of numbers, and to choose +a natural language file when available. + 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, and if not will play the normal 'demo-congrats'. +Always returns 0. + + + + + Make sure asterisk doesn't save CDR for a certain call + NoCDR(): makes sure there won't be any CDR written for a certain call + + + + Strip leading digits + StripMSD(count): Strips the leading 'count' digits from the channel's +associated extension. For example, the number 5551212 when stripped with a +count of 3 would be changed to 1212. This app always returns 0, and the PBX +will continue processing at the next priority for the *new* extension. + So, for example, if priority 3 of 5551212 is StripMSD 3, the next step +executed will be priority 4 of 1212. If you switch into an extension which +has no first step, the PBX will treat it as though the user dialed an +invalid extension. + + + + + Indicate progress + Progress(): Request that the channel indicate in-band progress is +available to the user. +Always returns 0. + + + + + Barge in (monitor) Zap channel + ZapBarge([channel]): 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. + + + + Conditional goto + GotoIf(Condition?label1:label2): Go to label 1 if condition is +true, to label2 if condition is false. Either label1 or label2 may be +omitted (in that case, we just don't take the particular branch) but not +both. Look for the condition syntax in examples or documentation. + + + \ No newline at end of file diff --git a/dialplan.php b/dialplan.php index 89d0b21bc..196fbc333 100644 --- a/dialplan.php +++ b/dialplan.php @@ -21,13 +21,8 @@ $dialplan = &$shout->getDialplan($context); // Set up the tree. $dpgui = Shout_Dialplan::singleton('x', $dialplan); -$action = Util::getFormData("action"); - -switch($action) { -case "do": - echo "stuff\n"; - break; -} +//$action = Util::getFormData("action"); +// $action = 'manager'; $title = _("Dialplan Manager"); @@ -38,7 +33,7 @@ $notification->notify(); echo $tabs->render($section); -require SHOUT_BASE . "/dialplan/$action.php"; +// require SHOUT_BASE . "/dialplan/$action.php"; require SHOUT_TEMPLATES . '/dialplan/manager.inc'; -- 2.11.0