Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Because a single agent can make themselves available to more than one queue, the
##### Agents Log In and Out

```

context queues-loginout {
6092 => {
Answer();
Expand All @@ -31,7 +30,6 @@ context queues-loginout {
In the above contexts, the agents dial 6092 to log into their queues, and they dial 6093 to log out of their queues. The agent is prompted for their agent number, and if they are logging in, their passcode, and then they are transferred to the proper extension in the queues-manip context. The queues-manip context does all the actual work:

```

context queues-manip {
// Raquel Squelch
_[IO]6121 => {
Expand Down Expand Up @@ -69,7 +67,6 @@ Also note that Rock will be among the first to be called in the sales-general qu
The call to queue-success() gives some feedback to the agent as they log in and out, that the process has completed.

```

macro queue-success(exten) {
if( ${queue-announce-success} > 0 ) {
switch(${exten:0:1}) {
Expand All @@ -89,7 +86,6 @@ macro queue-success(exten) {
The queue-addremove macro is defined in this manner:

```

macro queue-addremove(queuename,penalty,exten) {
switch(${exten:0:1}) {
case I: // Login
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pageid: 5243037
Notice in the above, that the commands to manipulate agents in queues have "@agents" in their arguments. This is a reference to the agents context:

```

context agents {
// General sales queue
8010 => {
Expand Down Expand Up @@ -51,7 +50,6 @@ The 8010, 8011, and 8013 extensions are purely for transferring incoming callers
Here is the callagent macro, note that if a person in the queue is called, but does not answer, then they are automatically removed from the queue.

```

macro callagent(device,exten) {
if( ${GROUP_COUNT(${exten}@agents)}=0 ) {
Set(OUTBOUND_GROUP_ONCE=${exten}@agents);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pageid: 5243040
If you would like to have a pre acknowledge message with option to reject the message you can use the following dialplan Macro as a base with the 'M' dial argument.

```

[macro-screen]
exten=>s,1,Wait(.25)
exten=>s,2,Read(ACCEPT,screen-callee-options,1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ This is an example of the most basic SLA setup. It uses the automatic dialplan g
sla.conf:

```

[line1]
type=trunk
device=DAHDI/1
Expand Down Expand Up @@ -38,7 +37,6 @@ device=SIP/station3
With this configuration, the dialplan is generated automatically. The first DAHDI channel should have its context set to "line1" and the second should be set to "line2" in dahdi.conf. In sip.conf, station1, station2, and station3 should all have their context set to "sla_stations".

```

[line1]
exten => s,1,SLATrunk(line1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ pageid: 4817207
chan_mobile supports 'device status' so you can do somthing like

```

exten => 1234,hint,SIP/30&Mobile/dave&Mobile/blackberry
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ If a call is not placed to a channel they will not be recorded in the log. eg a
Example (This will produce a logged call):

```

exten => 100,1,NoOp
exten => 100,n,Progress
exten => 100,n,Ringing
Expand All @@ -22,7 +21,6 @@ exten => 100,n,VoicemailMain(${CALLERID(num)@mycontext,s)
Example (This will not):

```

exten => 100,1,NoOp
exten => 100,n,VoicemailMain(${CALLERID(num)@mycontext,s)
```
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ The line=> entry in unistim.conf does not add an extension in asterisk by defaul
If you have this entry on unistim.conf :

```

[violet]
device=006038abcdef
line => 102
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ The `extensions.lua` file is loaded into memory once when the pbx_lua module is
This is probably a bad idea.

```

-- my fancy extensions.lua

extensions = {}
Expand All @@ -37,7 +36,6 @@ The `extensions` Table
The `extensions` table is a standard lua table and can be defined however you like. The pbx_lua module loads and sorts the table when it is needed. The keys in the table are context names and each value is another lua table containing extensions. Each key in the context table is an extension name and each value is an extension function.

```

extensions = {
context_table = {
extension1 = function()
Expand Down Expand Up @@ -74,7 +72,6 @@ Apps, Functions, and Variables
channel variable: var is the placeholder object

```

var = channel.my_variable
var:set("my value")
value = var:get("my value")
Expand All @@ -85,7 +82,6 @@ value = var:get("my value")
dialplan function: fax_modems is the placeholder object

```

fax_modems = channel.FAXOPT("module")

-- the function arguments are stored in the placeholder
Expand All @@ -99,7 +95,6 @@ value = fax_modems:get()
dialplan application: dial is the placeholder object

```

dial = app.dial

-- the only thing we can do with it is execute it
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ extensions.conf
---------------

```

[users]
exten => _1XX,1,Dial(SIP/${EXTEN})

Expand All @@ -29,7 +28,6 @@ extensions.lua
--------------

```

extensions = {}
extensions.users = {}

Expand All @@ -51,7 +49,6 @@ extensions.conf
---------------

```

[users]
exten => 100,1,Noop
exten => 100,n,Dial("SIP/100")
Expand All @@ -71,7 +68,6 @@ extensions.lua
--------------

```

extensions = {
users = {
[100] = function()
Expand Down Expand Up @@ -100,7 +96,6 @@ extensions.conf
---------------

```

exten => 100,1,Noop
exten => 100,n,Set(i=0)
exten => 100,n,While($[i < 10])
Expand All @@ -114,7 +109,6 @@ extensions.lua
--------------

```

i = 0
while i < 10 do
app.verbose("i = " .. i)
Expand All @@ -130,7 +124,6 @@ extensions.conf
---------------

```

exten => 100,1,Set(my_variable=my_value)
exten => 100,n,Verbose(my_variable = ${my_variable})
```
Expand All @@ -141,7 +134,6 @@ extensions.lua
--------------

```

channel.my_variable = "my_value"
app.verbose("my_variable = " .. channel.my_variable:get())
```
Expand All @@ -155,7 +147,6 @@ extensions.conf
---------------

```

exten => 100,1,Dial("SIP/100",,m)
```

Expand All @@ -165,7 +156,6 @@ extensions.lua
--------------

```

app.dial("SIP/100", nil, "m")
```

Expand All @@ -180,7 +170,6 @@ extensions.conf
---------------

```

[macro-dial]
exten => s,1,Noop
exten => s,n,Dial(${ARG1})
Expand All @@ -195,7 +184,6 @@ extensions.lua
--------------

```

extensions = {}
extensions.default = {}

Expand All @@ -219,7 +207,6 @@ extensions.conf
---------------

```

[default]
exten => 100,1,Goto(102,1)

Expand All @@ -233,7 +220,6 @@ extensions.lua
--------------

```

extensions = {}
extensions.default = {}

Expand All @@ -254,7 +240,6 @@ end
In Asterisk 1.8, use return

```

function extension_function(c, e)
return app.goto("default", "100", 1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Instead of defining every extension inline, you can use this method to create a
extensions.lua

```

-- this function serves as an extension function directly
function call_user(c, user)
app.dial("SIP/" .. user, 60)
Expand Down Expand Up @@ -54,7 +53,6 @@ In this example, we use a fancy function to register extensions.
extensions.lua

```

function register(context, extension, func)
if not extensions then
extensions = {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ In Asterisk 10 dialplan hints can be specified in `extensions.lua` in a manner s
extensions.lua

```

hints = {
default = {
["100"] = "SIP/100";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ This is best illustrated through the following examples
In this example, the user retrieves a value from the AstDB and then uses it as the destination for a `Dial` command.

```

[default]
exten => 1000,1,Set(DEST=${DB(egg/salad)})
same => n,Dial(${DEST},15)
Expand All @@ -42,15 +41,13 @@ exten => 1000,1,Set(DEST=${DB(egg/salad)})
Since the `DEST` variable is set and evaluated in the dialplan, its evaluation is case-insensitive. Thus the following would be equivalent:

```

exten => 1000,1,Set(DEST=${DB(egg/salad)})
same => n,Dial(${dest},15)
```

As would this:

```

exten => 1000,1,Set(DeSt=${DB(egg/salad)})
same => n,Dial(${dEsT},15)
```
Expand All @@ -60,14 +57,12 @@ exten => 1000,1,Set(DeSt=${DB(egg/salad)})
In this example, the user wishes to use a built-in variable in order to determine the destination for a call.

```

exten => _X.,1,Dial(SIP/${EXTEN})
```

Since the variable `EXTEN` is a built-in variable, the following would **not** be equivalent:

```

exten => _X.,1,Dial(SIP/${exten})
```

Expand All @@ -78,31 +73,27 @@ The lowercase `exten` variable would evaluate to an empty string since no previo
In this example, the user wishes to suggest to the SIP channel driver what codec to use on the call.

```

exten => 1000,Set(SIP_CODEC=g729)
same => n,Dial(SIP/1000,15)
```

`SIP_CODEC` is set in the dialplan, but it gets evaluated inside of Asterisk, so the evaluation is case-sensitive. Thus the following dialplan would not be equivalent:

```

exten => 1000,Set(sip_codec=g729)
same => n,Dial(SIP/1000,15)
```

This can lead to some rather confusing situations. Consider that a user wrote the following dialplan. He intended to set the variable `SIP_CODEC` but instead made a typo:

```

exten => 1000,Set(SIP_CODEc=g729)
same => n,Dial(SIP/1000,15)
```

As has already been discussed, this is not equivalent to using `SIP_CODEC`. The user looks over his dialplan and does not notice the typo. As a way of debugging, he decides to place a `NoOp` in the dialplan:

```

exten => 1000,Set(SIP_CODEc=g729)
same => n,NoOp(${SIP_CODEC})
same => n,Dial(SIP/1000,15)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Followme is now realtime-enabled.
To use, you must define two backend data structures, with the following fields:

```

followme:
name Name of this followme entry. Specified when invoking the FollowMe
application in the dialplan. This field is the only one which is
Expand All @@ -30,7 +29,6 @@ followme:
sorry_prompt Normally, "Unable to locate party".
```
```

followme_numbers:
name Name of this followme entry. Must match the name above.
ordinal An integer, specifying the order in which these numbers will be
Expand Down
Loading