Skip to content

Commit 4b51e51

Browse files
committed
docs: Don't escape * inside code blocks.
Inside a code block, `*` is not special and should not be escaped.
1 parent 6becf4a commit 4b51e51

File tree

89 files changed

+933
-933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+933
-933
lines changed

Diff for: docs/Configuration/Applications/Asterisk-Queues/Building-Queues.md

+42-42
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ What we're doing here is creating a [std-device] template and applying it to a p
5656
Then our devices can register to Asterisk. In my case I have a hard phone and a soft phone registered. I can verify their connectivity by running 'sip show peers'.
5757

5858
```
59-
\*CLI> sip show peers
59+
*CLI> sip show peers
6060
Name/username Host Dyn Nat ACL Port Status
6161
0004f2040001/0004f2040001 192.168.128.145 D 5060 Unmonitored
6262
0004f2040002/0004f2040002 192.168.128.126 D 5060 Unmonitored
@@ -69,7 +69,7 @@ Name/username Host Dyn Nat ACL Port Status
6969
Next, we need to configure our system to track the state of the devices. We do this by defining a 'hint' in the dialplan which creates the ability for a device subscription to be retained in memory. By default we can see there are no hints registered in our system by running the 'core show hints' command.
7070

7171
```
72-
\*CLI> core show hints
72+
*CLI> core show hints
7373
There are no registered dialplan hint
7474
7575
```
@@ -91,7 +91,7 @@ Then perform a 'dialplan reload' in order to reload the dialplan.
9191
After reloading our dialplan, you can see the status of the devices with 'core show hints' again.
9292

9393
```
94-
\*CLI> core show hints
94+
*CLI> core show hints
9595
9696
-= Registered Asterisk Dial Plan Hints =-
9797
0004f2040002@default : SIP/0004f2040002 State:Idle Watchers 0
@@ -117,11 +117,11 @@ exten => 555,1,Playback(tt-monkeys)
117117
Dial that extension and then check the state of your device on the console.
118118

119119
```
120-
\*CLI> == Using SIP RTP CoS mark 5
120+
*CLI> == Using SIP RTP CoS mark 5
121121
-- Executing [555@devices:1] Playback("SIP/0004f2040001-00000001", "tt-monkeys") in new stack
122122
-- <SIP/0004f2040001-00000001> Playing 'tt-monkeys.slin' (language 'en')
123123
124-
\*CLI> core show hints
124+
*CLI> core show hints
125125
126126
-= Registered Asterisk Dial Plan Hints =-
127127
0004f2040002@default : SIP/0004f2040002 State:Idle Watchers 0
@@ -156,11 +156,11 @@ callcounter=yes ; <-- add this
156156
Then reload chan_sip with 'sip reload' and perform our 555 test again. Dial 555 and then check the device state with 'core show hints'.
157157

158158
```
159-
\*CLI> == Using SIP RTP CoS mark 5
159+
*CLI> == Using SIP RTP CoS mark 5
160160
-- Executing [555@devices:1] Playback("SIP/0004f2040001-00000002", "tt-monkeys") in new stack
161161
-- <SIP/0004f2040001-00000002> Playing 'tt-monkeys.slin' (language 'en')
162162
163-
\*CLI> core show hints
163+
*CLI> core show hints
164164
165165
-= Registered Asterisk Dial Plan Hints =-
166166
0004f2040002@default : SIP/0004f2040002 State:Idle Watchers 0
@@ -214,7 +214,7 @@ ringinuse=no ; don't ring members when already InUse
214214
After defining our queues, lets reload our app_queue.so module.
215215

216216
```
217-
\*CLI> module reload app_queue.so
217+
*CLI> module reload app_queue.so
218218
-- Reloading module 'app_queue.so' (True Call Queueing)
219219
220220
== Parsing '/etc/asterisk/queues.conf': == Found
@@ -224,7 +224,7 @@ After defining our queues, lets reload our app_queue.so module.
224224
Then verify our queues loaded with 'queue show'.
225225

226226
```
227-
\*CLI> queue show
227+
*CLI> queue show
228228
support has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
229229
No Members
230230
No Callers
@@ -252,15 +252,15 @@ The penalty, membername, and state_interface are all optional values. Special at
252252
Lets add our device located at SIP/0004f2040001
253253

254254
```
255-
\*CLI> queue add member SIP/0004f2040001 to sales
255+
*CLI> queue add member SIP/0004f2040001 to sales
256256
Added interface 'SIP/0004f2040001' to queue 'sales'
257257
258258
```
259259

260260
Then lets verify our member was indeed added.
261261

262262
```
263-
\*CLI> queue show sales
263+
*CLI> queue show sales
264264
sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
265265
Members:
266266
SIP/0004f2040001 (dynamic) (Not in use) has taken no calls yet
@@ -271,12 +271,12 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talkti
271271
Now, if we dial our 555 extension, we should see that our member becomes InUse within the queue.
272272

273273
```
274-
\*CLI> == Using SIP RTP CoS mark 5
274+
*CLI> == Using SIP RTP CoS mark 5
275275
-- Executing [555@devices:1] Playback("SIP/0004f2040001-00000001", "tt-monkeys") in new stack
276276
-- <SIP/0004f2040001-00000001> Playing 'tt-monkeys.slin' (language 'en')
277277
278278
279-
\*CLI> queue show sales
279+
*CLI> queue show sales
280280
sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
281281
Members:
282282
SIP/0004f2040001 (dynamic) (In use) has taken no calls yet
@@ -287,7 +287,7 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talkti
287287
We can also remove our members from the queue using the 'queue remove' CLI command.
288288

289289
```
290-
\*CLI> queue remove member SIP/0004f2040001 from sales
290+
*CLI> queue remove member SIP/0004f2040001 from sales
291291
Removed interface 'SIP/0004f2040001' from queue 'sales'
292292
293293
```
@@ -312,14 +312,14 @@ exten => 101,1,Queue(support)
312312
Then reload the dialplan, and try calling extension 100 from SIP/0004f2040002, which is the device we have not logged into the queue.
313313

314314
```
315-
\*CLI> dialplan reload
315+
*CLI> dialplan reload
316316
317317
```
318318

319319
And now we call the queue at extension 100 which will ring our device at SIP/0004f2040001.
320320

321321
```
322-
\*CLI> == Using SIP RTP CoS mark 5
322+
*CLI> == Using SIP RTP CoS mark 5
323323
-- Executing [100@devices:1] Queue("SIP/0004f2040002-00000005", "sales") in new stack
324324
-- Started music on hold, class 'default', on SIP/0004f2040002-00000005
325325
== Using SIP RTP CoS mark 5
@@ -330,7 +330,7 @@ And now we call the queue at extension 100 which will ring our device at SIP/000
330330
We can see the device state has changed to Ringing while the device is ringing.
331331

332332
```
333-
\*CLI> queue show sales
333+
*CLI> queue show sales
334334
sales has 1 calls (max unlimited) in 'rrmemory' strategy (2s holdtime, 3s talktime), W:0, C:1, A:1, SL:0.0% within 0s
335335
Members:
336336
SIP/0004f2040001 (dynamic) (Ringing) has taken 1 calls (last was 14 secs ago)
@@ -342,7 +342,7 @@ sales has 1 calls (max unlimited) in 'rrmemory' strategy (2s holdtime, 3s talkti
342342
Our queue member then answers the phone.
343343

344344
```
345-
\*CLI> -- SIP/0004f2040001-00000006 answered SIP/0004f2040002-00000005
345+
*CLI> -- SIP/0004f2040001-00000006 answered SIP/0004f2040002-00000005
346346
-- Stopped music on hold on SIP/0004f2040002-00000005
347347
-- Native bridging SIP/0004f2040002-00000005 and SIP/0004f2040001-00000006
348348
@@ -351,7 +351,7 @@ Our queue member then answers the phone.
351351
And we can see the queue member is now in use.
352352

353353
```
354-
\*CLI> queue show sales
354+
*CLI> queue show sales
355355
sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 3s talktime), W:0, C:1, A:1, SL:0.0% within 0s
356356
Members:
357357
SIP/0004f2040001 (dynamic) (In use) has taken 1 calls (last was 22 secs ago)
@@ -362,14 +362,14 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 3s talkti
362362
Then the call is hung up.
363363

364364
```
365-
\*CLI> == Spawn extension (devices, 100, 1) exited non-zero on 'SIP/0004f2040002-00000005'
365+
*CLI> == Spawn extension (devices, 100, 1) exited non-zero on 'SIP/0004f2040002-00000005'
366366
367367
```
368368

369369
And we see that our queue member is available to take another call.
370370

371371
```
372-
\*CLI> queue show sales
372+
*CLI> queue show sales
373373
sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 4s talktime), W:0, C:2, A:1, SL:0.0% within 0s
374374
Members:
375375
SIP/0004f2040001 (dynamic) (Not in use) has taken 2 calls (last was 6 secs ago)
@@ -435,9 +435,9 @@ Lets move into the nitty-gritty section and show how we can login and logout our
435435
First, we create a pattern match that takes star plus the queue number that we want to login or logout of. So to login/out of the sales queue (100) we would dial \*100. We use the same extension for logging in and out.
436436

437437
```
438-
; Extension \*100 or \*101 will login/logout a queue member from sales or support queues respectively.
439-
exten => _\*10[0-1],1,Set(xtn=${EXTEN:1}) ; save ${EXTEN} with \* chopped off to ${xtn}
440-
exten => _\*10[0-1],n,Goto(queueLoginLogout,member_check,1) ; check if already logged into a queue
438+
; Extension *100 or *101 will login/logout a queue member from sales or support queues respectively.
439+
exten => _*10[0-1],1,Set(xtn=${EXTEN:1}) ; save ${EXTEN} with * chopped off to ${xtn}
440+
exten => _*10[0-1],n,Goto(queueLoginLogout,member_check,1) ; check if already logged into a queue
441441
442442
```
443443

@@ -547,7 +547,7 @@ And that's it! Give it a shot and you should see console output similar to the f
547547
You can see there are already a couple of queue members logged into the sales queue.
548548

549549
```
550-
\*CLI> queue show sales
550+
*CLI> queue show sales
551551
sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 4s talktime), W:0, C:2, A:1, SL:0.0% within 0s
552552
Members:
553553
SIP/0004f2040001 (dynamic) (Not in use) has taken no calls yet
@@ -559,9 +559,9 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 4s talkti
559559
Then we dial \*100 to logout the active device from the sales queue.
560560

561561
```
562-
\*CLI> == Using SIP RTP CoS mark 5
563-
-- Executing [\*100@devices:1] Set("SIP/0004f2040001-00000012", "xtn=100") in new stack
564-
-- Executing [\*100@devices:2] Goto("SIP/0004f2040001-00000012", "queueLoginLogout,member_check,1") in new stack
562+
*CLI> == Using SIP RTP CoS mark 5
563+
-- Executing [*100@devices:1] Set("SIP/0004f2040001-00000012", "xtn=100") in new stack
564+
-- Executing [*100@devices:2] Goto("SIP/0004f2040001-00000012", "queueLoginLogout,member_check,1") in new stack
565565
-- Goto (queueLoginLogout,member_check,1)
566566
-- Executing [member_check@queueLoginLogout:1] Verbose("SIP/0004f2040001-00000012", "2,Logging queue member in or out of the request queue") in new stack
567567
== Logging queue member in or out of the request queue
@@ -595,7 +595,7 @@ Then we dial \*100 to logout the active device from the sales queue.
595595
And we can see that the device we loggd out by running 'queue show sales'.
596596

597597
```
598-
\*CLI> queue show sales
598+
*CLI> queue show sales
599599
sales has 0 calls (max unlimited) in 'rrmemory' strategy (3s holdtime, 4s talktime), W:0, C:2, A:1, SL:0.0% within 0s
600600
Members:
601601
SIP/0004f2040002 (dynamic) (Not in use) has taken no calls yet
@@ -610,7 +610,7 @@ Once we have our queue members logged in, it is inevitable that they will want t
610610
We have two devices logged into the sales queue as we can see with the 'queue show sales' CLI command.
611611

612612
```
613-
\*CLI> queue show sales
613+
*CLI> queue show sales
614614
sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
615615
Members:
616616
SIP/0004f2040002 (dynamic) (Not in use) has taken no calls yet
@@ -632,15 +632,15 @@ Usage: queue {pause|unpause} member <member> [queue <queue> [reason <reason>]]
632632
Lets pause device 0004f2040001 in the sales queue by executing the following.
633633

634634
```
635-
\*CLI> queue pause member SIP/0004f2040001 queue sales
635+
*CLI> queue pause member SIP/0004f2040001 queue sales
636636
paused interface 'SIP/0004f2040001' in queue 'sales' for reason 'lunch'
637637
638638
```
639639

640640
And we can see they are paused with 'queue show sales'.
641641

642642
```
643-
\*CLI> queue show sales
643+
*CLI> queue show sales
644644
sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
645645
Members:
646646
SIP/0004f2040002 (dynamic) (Not in use) has taken no calls yet
@@ -652,15 +652,15 @@ sales has 0 calls (max unlimited) in 'rrmemory' strategy (0s holdtime, 0s talkti
652652
At this point the queue member will no longer receive calls from the system. We can unpause them with the CLI command 'queue unpause member'.
653653

654654
```
655-
\*CLI> queue unpause member SIP/0004f2040001 queue sales
655+
*CLI> queue unpause member SIP/0004f2040001 queue sales
656656
unpaused interface 'SIP/0004f2040001' in queue 'sales'
657657
658658
```
659659

660660
And if you don't specify a queue, it will pause or unpause from all queues.
661661

662662
```
663-
\*CLI> queue pause member SIP/0004f2040001
663+
*CLI> queue pause member SIP/0004f2040001
664664
paused interface 'SIP/0004f2040001'
665665
666666
```
@@ -677,11 +677,11 @@ extensions.conf
677677
678678
; Allow queue members to pause and unpause themselves from all queues, or an individual queue.
679679
;
680-
; _\*0[01]! pattern match will match on \*00 and \*01 plus 0 or more digits.
681-
exten => _\*0[01]!,1,Verbose(2,Pausing or unpausing queue member from one or more queues)
682-
exten => _\*0[01]!,n,Set(xtn=${EXTEN:3}) ; save the queue extension to 'xtn'
683-
exten => _\*0[01]!,n,Set(thisQueue=${GLOBAL(QUEUE_${xtn})}) ; get the queue name if available
684-
exten => _\*0[01]!,n,GotoIf($[${ISNULL(${thisQueue})} & ${EXISTS(${xtn})}]?invalid_queue,1) ; if 'thisQueue' is blank and the
680+
; _*0[01]! pattern match will match on *00 and *01 plus 0 or more digits.
681+
exten => _*0[01]!,1,Verbose(2,Pausing or unpausing queue member from one or more queues)
682+
exten => _*0[01]!,n,Set(xtn=${EXTEN:3}) ; save the queue extension to 'xtn'
683+
exten => _*0[01]!,n,Set(thisQueue=${GLOBAL(QUEUE_${xtn})}) ; get the queue name if available
684+
exten => _*0[01]!,n,GotoIf($[${ISNULL(${thisQueue})} & ${EXISTS(${xtn})}]?invalid_queue,1) ; if 'thisQueue' is blank and the
685685
; the agent dialed a queue exten,
686686
; we will tell them it's invalid
687687
@@ -700,15 +700,15 @@ offset ^ ^ length
700700
Which causes the following.
701701

702702
```
703-
\*00100
703+
*00100
704704
^^ offset these characters
705705
706-
\*00100
706+
*00100
707707
^ then return a digit length of one, which is digit 0
708708
709709
```
710710
```
711-
exten => _\*0[01]!,n,GotoIf($[${EXTEN:2:1} = 0]?pause,1:unpause,1) ; determine if they wanted to pause
711+
exten => _*0[01]!,n,GotoIf($[${EXTEN:2:1} = 0]?pause,1:unpause,1) ; determine if they wanted to pause
712712
; or to unpause.
713713
714714
```

0 commit comments

Comments
 (0)