-
Notifications
You must be signed in to change notification settings - Fork 3
/
extensions-pngnpbx-abc-v20m.ael2
4763 lines (4319 loc) · 191 KB
/
extensions-pngnpbx-abc-v20m.ael2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
****************************************************************
* *
* Always Be Conferencing (ABC) *
* *
* Authors: chris @ Penguin PBX Solutions (PenguinPBX.com) *
* Version: 20m "MAGA and MAF Edition" *
* Release: 6 January 2023 *
* License: Creative Commons Zero v1.0 Universal (CC0 1.0) *
* *
* To the extent possible under law, the author(s) have *
* dedicated all copyright and related and neighboring rights *
* to this software to the public domain worldwide. This *
* software is distributed without any warranty. *
* *
* You should have received a copy of the CC0 Public Domain *
* Dedication along with this software. If not, then please *
* see: <http://creativecommons.org/publicdomain/zero/1.0/>. *
* *
****************************************************************
Howdy
=====
ABC starts your Conference Bridge(s) in ASTERISK(R) by sending calls to up
to forty-two other participants, making it easier for both you and your Friends
to stay connected using audio and (starting in version 16i) even some video.
ABC requires ASTERISK to already be installed and working. ABC is tested most
with ASTERISK version 20, but starting in ABC version 16l you can get most of
it working okay with ASTERISK version 13 as well. ABC can be integrated into
existing FreePBX(R) setups -- see mini-HOWTO & Examples below.
ABC is almost entirely contained in the single file you are reading right now.
This file is written in ASTERISK Extension Language dial plan format. Ideally,
you will only need to include this file as new dial plan configuration, then
jump to it from your existing "extensions.conf" or "extensions_custom.conf"
files. See Examples 1-15 below for some integration ideas. Other config files
to look at include "confbridge.conf", "indications.conf" and "voicemail.conf".
Also you can create an "abc.conf" file in the same directory for more control.
Generally you will only need minimal modifications to get working with ABC.
There are many use cases considered by ABC, improving with each release.
Early versions (15) made for fast conf calls; version 16c added emergency call
nice-things-to-have; single codec video was added in 16i; followed by Work From
Home/Phone scenarios in version 16k; then separate Yurt Corners, backwards
compatibility with ASTERISK version 13, and Parallel non-conference notifying
mode via voicemail (a popular user request!) were all added in version 16l.
In 20m, the parallel idea was extended to also use the Page() application
(the Page() app internally implements a limited type of conference call.)
ABC IS YOUR FREE GIFT, AS-IS, WITH NO WARRANTY!!!
ABC Use Case: Emergency Outbound Calls (EOC)
--------------------------------------------
ABC can be configured to very quickly notify others of your call attempts,
using several different methods, which can be mixed together as you wish:
* Conference Calls
* Phone Calls
* Emails
* Voicemails
* Texts
* Overhead Pages
* Strobe Lights
* External Processes
* Cloud APIs
* and more!
For SIP Call-type notifications, the caller ID info notify-ees see on phones
can show them your name; your phone number; your X/Y/Z co-ordinates including
GPS, Plus Codes, elevation, depth, room, floor, and/or building number; and the
Remote End destination phone number you originally dialed eg. 112, 911, 999,
etc.
Of course, as this is Always Be Conferencing, the Conference Calls notification
method is perhaps the most interesting to consider...
When your Friends answer their phones, they will hear some short notes (A-B-C),
and (optionally) a Text-To-Speech (TTS) play back of your GPS co-ordinates, and
then be connected to talk with you and other Friends in your "Yurt" conference
room.
In Simple & Tin Can Modes, Friends will even be able to talk with you *before
Remote End answers* -- very helpful if the Remote End *never answers* due to
technical/capacity failures ouside of your network! (What if the far away ops
are all busy? ABC can let you talk to local safety and security teams, instead
of waiting on hold!)
Also in Simple Mode, the conference will continue until all parties disconnect
-- even if the OriGinal caller (you the O.G.) hang up the phone / drop the call
before anybody else "really" answers and starts talking!
But wait, there's more! And more than one Conference Call room available...
Instead of Friends, or in addition to them, if you use Paladins, they will be
placed into a separate conference -- the "Palace" -- all by themselves. They
won't be able to talk with you -- like your Friends in the "Yurt" conference
-- but Paladins will be able to hear you and Remote End talking, and Paladins
can talk to each other to help co-ordinate the local response to your call.
Sometimes Paladins don't listen to the Yurt, instead, they enter the Palace
and talk amongst themselves -- but that is still triggered by you the O.G.
making a phone call (and fully configurable from within ABC dial plan API.)
Related, Trolls are in the Yurt with you the OG caller, the Remote End, and
any Friends; but Trolls can only listen and not speak to anyone. Also Trolls
only get two DTMF menu options (to change their listening volume up or down.)
Sometimes Trolls are not people but blinking lights or overhead speakers that
play pre-recorded/dynamic-text-to-speech back alert messages -- up to you.
For those not wishing to do much conferencing, but get voicemail/email/page
notifications when somebody makes an emergency call, and do so with minimal
impact to their existing dial plan, then check out Parallel Mode, as described
in Examples #13, #14, and #15.
ABC Use Case: Work From Home (WFH)
AKA Insta Teams Mode (ITM)
----------------------------------------
ABC can be configured in Insta Teams Mode, to help you reach out to your Team
without them having to remember all the conference call details themselves,
making it easier for you to start-up Yurts with your Friends.
With WFH/ITM, you text: "I'll give y'all a call tomorrow morning between 10
and 11." Then tomorrow you call your ABC phone number, authorize the call (PIN)
to start spooling out to your Team, and then join in talking with everyone who
accepts the invitation to your Yurt. Or, check-in more on important projects,
from the road, using just your phone, when the chat/email threads get too long.
There are several differences in this Use Case...
In contrast with emergency calls, in Teams Mode your Friends will *NOT* be
placed into the Yurt right away -- they will hear a short message from you and
then a message asking them to join via "press 1" keypad option. This helps
prevent your Yurt from getting stuck in somebody's cell phone voicemail system.
Also, there are no Paladins or Trolls in this mode. And Friends in Teams Mode
won't hear your GPS co-ordinates (like they do in emergency modes). In-call
menu options are a little different, too.
You might think of the Work From Home / Insta Teams Mode solution as a sort of
mini-town hall teleconference, complete with features like *9 for raising your
hand.
abc.conf
========
This optional file can go into your /etc/asterisk/ directory:
[general] ; Always Be Conferencing by Penguin PBX Solutions.
;
demomode=nope ; Demo mode uses extension numbers 7001-7008.
; There are also some named (not numbered) extensions
; that you might want to try eg. ABCtheOG.
;
[eoc] ; Emergency Outbound Calling
;
paravm=ABCfriend1 ; Who gets notified of EOC calls (in Parallel mode.)
paravm=ABCfriend2 ; May be specified up to 10 times.
paravm=ABCtroll1 ; Be sure to include @context if not using 'default'.
paravm=ABCtroll2 ; These entries must exist in voicemail.conf file.
; Consider making new voicemail users in a new
; voicemail context just for EOC -- then you can
; specify a better 'emailsubject' and 'emailbody'
; to clearly represent that these are emergencies.
;
parapg=PJSIP/123 ; Instead of notifying with VoiceMail, send a Page.
parapg=PJSIP/456 ; Each of these phones will hear call meta data,
parapg=PJSIP/789 ; not the actual audio stream.
;
;
[itm] ; Insta Teams Mode (WFH scenarios)
;
conferenceminutes=120 ; Maximum length for one conference.
monthlyminutes=600 ; Allowed cumulative conference minutes for the month.
vmcontext=default ; Voicemail context used to authenticate users.
numberstyle=us ; Default is 'international' for robo number speech.
TESTING
=======
ABC was tested most with PJSIP on ASTERISK certified version 16.8-cert3.
It should also work okay with other channel techs -- see DAHDI in Example #2.
And chan_sip should mostly work (see PJSIP_DIAL_CONTACTS and PJSIP_HEADERS for
exceptions.) ASTERISK version 13 also mostly works (except for Yurt Corners
in Work From Home Mode) but it uses some call files in /tmp and the System()
application to shuffle files around for asynchronous call spooling.
Extension 922 is used often in the ABC Examples -- see below -- although any
extension number (0-9a-zA-Z) should work. But you should test it yourself.
Really, you should test and verify everything in ABC that you intend to use!
If you are not comfortable with that, or even if you are, please consider talks
with your neighborhood free/libre/open source software folks for separate
support/warranty consulting services.
AGAIN: ABC IS YOUR FREE GIFT, AS-IS, WITH NO WARRANTY!!!
FEATURES
========
~ Multiple notifications at start of call - by vmail, email and/or phone calls.
~ Dynamic call back numbers - helps users on phones that lack dedicated DIDs.
~ Caller ID based on Subnet ID - easier remote office, VPN and VLAN support.
~ Update desk phone GPS with included visual-IVR - includes text menu on screen.
~ Encrypted local storage of GPS info - protects address info when data at rest.
~ Dynamic Location Routing per RFC 6442 - full discussion included in this file.
~ Text-To-Speech of GPS and additional information - good ideas for emergencies.
~ Record each leg of the call in separate WAV files - consider all legal issues.
~ Automatically bridge in callees - "Simple Mode".
~ Wait for answer before bridging - "Tin Can Mode".
~ Prompt for key to confirm answer - "Insta Teams Mode".
~ Skip the conferencing and just notify - "Parallel Mode with Voicemail Notify".
~ Easy integration with ASTERISK and FreePBX installs - see mini-HOWTO below!
KNOWN BUGS
==========
~ Callers from the same extension number dialing the same destination
number will end up in the same call path. This could happen when users
dial 922 from their laptop soft phone at the same time as dialing 922
from their desktop phone. The recommended workaround is to use separate
extension numbers for each device registration.
~ DTMF pass through is not activated (except in Parallel Mode). Bug/Feature!
TODO LIST - EOC scenarios
=========================
~ Support telecommunications relay services via MESSAGE functions.
~ Pidgin example using SIMPLE driver to see pop-up notifications on PCs.
~ SMS support for Text-to-Remote end.
~ Friends option to start out muted - on a friend by friend basis,
then press 1 to un-mute at any time.
~ Multicast addresses for paging.
~ Add option 8 for "U"sers - to list out the roll of users in the conf.
~ Finish CLIPS codes for appending to Emergency Caller ID number and/or
dialed number - either way it is for parsing by the telco, to map the codes
they assign for each of your specific physical locations.
~ Add waiting rooms for Yurts to be called into by end users.
The admin should get a "knock-knock-knock" sound that somebody wants to join.
Admin gets 60 seconds to listen to the name and/or number and accept.
~ Always playback any Z-coordinates, in addition to X and Y.
~ Reminder function to check if user did not recently update their
GPS, to be placed just before a "Dial" by the user.
~ Most overhead paging does not actually use the Page() application in ASTERISK.
~ Disconnect Remote End when OG and Friends have left Yurt (using marked users.)
~ Extend Parallel Mode beyond just Voicemail Notifications.
~ Nosy Paladin audio feed from Yurt into Palace sounds terrible! Broadcast()?
TODO LIST - WFH scenarios
=========================
~ Support chat box via MESSAGE functions. Send SMS to users so they
can enter from their phones (eg. audio from call on bluetooth, but
full chat window on your smart phone.)
~ More notifications when recording starts/stops.
Such as when during the chat, admin starts recording,
play message to all on the call.
~ Automatically mute all new entrants after Yurt size exceeds X users.
~ Friendly instructions at the start for callee. "This is a YurtTel call.
Press *6 to unMute yourself." either before or after the temp greeting.
~ Single entry sound, when room is full and/or 60 seconds. "There are
X people in the room, press *8 to redial the Y people still not here."
~ LEAVE SOUNDS! Option ??
~ Playback "everyone else has left the call" if you are only one remaining.
~ Allowing adding new phone numbers on-the-fly mid-conference.
TODO LIST - generally
=====================
~ Line up Test numbers with Example numbers.
~ Update to use Broadcast() application introduced in ASTERISK 18. Big job!
Quick Start mini-HOWTO demo for first time ABC users on FreePBX
===============================================================
Only 95 lines! But up and running in 5 minutes!
This demo assumes all phones are using same channel technology.
This could be all chan_PJSIP, or all chan_SIP, or all chan_DAHDI,
or all chan_IAX, or others - depending on your configuration.
For new installs, chan_PJSIP is recommended.
1. First, SSH into your PBX, and then run the following commands:
#BEGIN_MINI_COMMANDS#
# MaKe DIRectory
mkdir ~/abc
# Change Directory
cd ~/abc
# download this file into the new "abc" directory
# TODO: nobody user in /tmp
wget https://raw.githubusercontent.com/chrsmj/always-be-conferencing/master/extensions-pngnpbx-abc-v20m.ael2
# ECHO line into dial plan - AEL format used by ABC
echo '#include "extensions-pngnpbx-abc-v20m.ael2"' > extensions.ael
# ECHO line into dial plan - CONF format used by FreePBX
echo '[from-internal-custom]' > extensions_custom.conf
# add some glued lines to the CONF dial plan file
echo 'exten => _123*222,1,Goto(pngnpbx-abc-demo,${EXTEN},1)' >> extensions_custom.conf
echo 'exten => _123*222*,1,Goto(pngnpbx-abc-demo,${EXTEN},1)' >> extensions_custom.conf
echo 'exten => _123*222*.,1,Goto(pngnpbx-abc-demo,${EXTEN},1)' >> extensions_custom.conf
echo 'exten => _123*222X*.,1,Goto(pngnpbx-abc-demo,${EXTEN},1)' >> extensions_custom.conf
# Show DIFFerences with current FreePBX custom extensions.
diff -u extensions_custom.conf /etc/asterisk/extensions_custom.conf
# Check for any AEL dial plan, using same command.
diff -u extensions.ael /etc/asterisk/extensions.ael
# LiSt existing files, with four options.
ls -last /etc/asterisk/extensions_custom.conf
ls -last /etc/asterisk/extensions.ael
#END_MINI_COMMANDS#
2. If there's no existing files or no major differences, then copying
should be fairly straight forward, with help from "sudo" command:
#BEGIN_MINI_SUDO_COMMANDS#
# CoPy with "-i" option to prompt before overwrite.
sudo cp -i ~/abc/extensions* /etc/asterisk/
# Non-sudo check of file details.
ls -last /etc/asterisk/extensions_custom.conf
ls -last /etc/asterisk/extensions.ael
#END_MINI_SUDO_COMMANDS#
If there are any errors on the copying, then you should manually inspect
the files for conflicts. Most likely, the only conflict will be with the
extensions_custom.conf files. Check those carefully before any mergers.
If extensions_custom.conf already exists, then you will need to insert the
ABC "_123*222..." config lines into the existing [from-internal-custom]
context (or create the context if it does not already exist.)
3. After completing the file copying, exit SSH and open up your PBX GUI.
Issue a full PBX reload using your GUI (sometimes you have to make a small
change to get the "Apply Config" button to appear, so make a trivial thing
like adding ABC after your name, then "Submit", then "Apply Config".)
4. The "Apply Config" process may take a minute.
5. Finally, start making test calls from your desk phone, with big dial lines:
123*2223*1000*2000*3000
...replacing 1000 with an extension acting as your "Remote End" operator
and replacing 2000 and 3000 with your own local "friend" extensions.
(You can shorten these in the future - remember this is the demo :)
To hear your GPS co-ordinates, any participant can press * at any time
during the call. To stop the bot playback, any participant can press #.
See additional conference bridge menu options below - there are also
different options available, based on the nature of the call.
To silence the ring-back you hear from friend's phones, but not the
Remote End, you can run the following command on the ASTERISK CLI:
sirius*CLI> indication add us silent 0/15000
Thus ends the mini-HOWTO. HTH!
PREREQUISITE: The ASTERISK Extension Language (AEL)
===================================================
This is not your standard dial plan "/etc/asterisk/extensions.conf" file!
ABC is configured in the ASTERISK Extension Language (AEL). AEL syntax is
converted into standard CONF file format when loaded in to system memory
by ASTERISK. But you should not need to edit this ABC AEL file very often,
if ever. It only needs to be *included* into your dialplan.
Please copy this file into your "/etc/asterisk/" directory and set it to
read-only permission for the user/group your ASTERISK process runs as (usually
"root" or "asterisk".)
To confirm you have AEL working in your install of ASTERISK, you can run this
command on the ASTERISK CLI:
sirius*CLI> core show help ael
...which, if loaded properly, should list "ael reload" and "ael set debug".
Otherwise, if this is your first time using AEL, then you may need to manually
load the module, or take other steps. This may include rebuilding from source
code eg. selecting the AEL module when using "make menuconfig".
After confirming AEL is active and working, edit (or create) this file:
/etc/asterisk/extensions.ael
And add this line (with no spaces at the front):
#include "extensions-pngnpbx-abc-v20m.ael2"
...then save the file. Now you should be able to load the AEL config and view
the in-memory dial plan in CONF format:
sirius*CLI> ael reload
sirius*CLI> dialplan show pngnpbx-abc-dial
If that works, and you see a bunch of dial plan looking output, Congratulations!
You are now able to use ABC from standard dial plan in "extensions.conf" file
-- or in the "extensions_custom.conf" file if you are using FreePBX.
Simple Mode vs. Tin Can Mode vs. Insta Teams Mode vs. Parallel Notification Mode
================================================================================
If you choose Tin Can mode, then ABC will use Dial() instead of Originate() at
start of the call to the Remote End. This is to help satisfy requirements in
some situations where it is deemed desirable to only route the call and not
answer the caller via early bridging. (Particularly this is for emergency
calling situations.)
Please note the following major differences between Modes:
0. In Simple Mode, everyone can always talk to each other.
In Tin Can Mode, *on some phones*, Caller can talk to Friends before
Remote End answers (but it depends on the Friends' type of phone.)
In Teams Mode, Friends do not enter the Yurt until they press 1 to opt-in.
In Parallel Mode, there is no conferencing ;( only notifications.
1. In Simple Mode, everyone always gets access to DTMF menu options, because
they are always in the Yurt.
2. In Teams Mode, Friends must press 1 to join, then it is basically just
like Simple Mode.
3. In Tin Can Mode, Friends will not get access to DTMF menu options until the
Remote End answers. Then, everyone will get access, same as Simple Mode.
4. In Tin Can Mode, there may be a few more frames of feedback immediately
after the Remote End answers.
5. In Tin Can Mode ONLY, when caller hangs up before Remote End answers, then
the call will drop. (MAYBE TODO: Fix this in a future release.)
PRIVACY
=======
The handling of exact GPS co-ordinates of each phone presents multiple safety,
security, and privacy concerns. (See RFCs 3693, 6280, 6442 and 6772.)
ABC considers carefully each of the six basic Geopriv roles introduced in
RFC 3693 and later refined in RFC 6280 Section 3.2, to wit:
1. Target: ABC can be the Target, or Targets can be User-based or Device-based.
2. Device: ABC can be the Device, but more commonly it will be your SIP phone.
3. Rule Maker: ABC provides RM functions. (See Conference Bridge DTMF options.)
4. Location Generator: ABC can be the LG. (See DIY GPS IVR for users/admins.)
5. Location Server: ABC can perform LS. (See encrypted internal AstDB storage.)
6. Location Recipient: ABC considers almost all participants as potential LRs.
ABC tries to get the DL to the LRs by multiple automatic and manual methods.
With ABC as your LS, your personal location data is not *pre-registered* with
any 3rd-party remote/hosted/cloud/government/etc. services in large centralized
databases, with all of the associated privacy and data safety issues that can
entail. But new regulations, such as those covering finer detail refinements in
Dispatchable Location (DL) info, threaten to dramatically increase the size and
scope of these centralized LS databases, opening up previously unknown employee
where-abouts to 'manual ALI query' and other privacy attacks in the future.
In the author's opinion, too many SIP providers are complying with changing
regulatory requirements by (un)intentionally sacrificing liberty in exchange
for safety, acting as the LS when that is wholly un-necessary. While not
exactly *security theater*, the choice between exposing personal information
outside of your PBX/MLTS only at the time of an emergency vs. storing it all
of the time with the telephone company is not to be taken lightly if you value
the privacy of your users. (Do you even SSH or VPN bro ?)
ABC takes a more dynamic approach (Dynamic Location Routing) instead of the
old Registered Address system. ABC only releases your location details
from the local PBX system when it is needed. Until then, ABC can store your data
at rest in encrypted format on the local ASTERISK system's internal SQLite
database (AstDB) using a separate key file. This prevents bulk dumping of clear
text data via ASTERISK CLI commands like "database show".
By default, the key is located on the filesystem in the /var/lib/asterisk/keys/
directory. When you automate backup processes, then you may want to consider
changing these slightly, for example, to not include the AstDB in directory
/var/lib/asterisk/ with /var/lib/asterisk/keys/ directory in the same tarball.
(That would be like hiding the key under the door mat.)
Or, you might consider changing the location of the default key file used for
GPS data encryption (TODO: make this easier in a future ABC revision.)
However, should you lose the key file, then users will need to manually
re-update their GPS XYZ co-ordinates, using the included IVR as the LG. Until
they do, the PBX will not know where they are, and it will fail when trying to
do things like send those co-ordinates to the Remote End LR.
Steps to (re)create the key file:
sudo mkdir /var/lib/asterisk/keys
sudo touch /var/lib/asterisk/keys/pngnpbx-abc-key.txt
sudo chown asterisk.asterisk /var/lib/asterisk/keys/pngnpbx-abc-key.txt
Feel free to store 16 random alpha-numeric characters in that file,
otherwise, a somewhat random string will be used.
Of course, you are free to forego the novel location features, and stick with
the Registered Address system offered by your telephone company. ABC is still
totally compatible with those types of legacy solutions.
LOGGING
=======
Call Detail Records will be saved in files based on whatever ABC account name
you specify ie. the account code will be set to this name on (almost) all
channels. In the examples (below) it would be "abctest.csv" in the same
directory as your "Master.csv" (assuming you are using CSV for CDRs.)
Optionally you can record the call (see example #2 below).
Look for the recordings in "/var/spool/asterisk/monitor/" directory.
The ABC account name will be used to prefix the files (one file per leg.)
CAREFUL when recording eg. legal issues, drive space, privacy, etc.
EXAMPLES
========
YOU MUST CHANGE #YOUR-TRUNK-s#, the "ABCTO" number, the extension numbers, and
choose valid Call-Back numbers, whenever copy-pasta'ing these examples !!!
But please feel free to copy the next 411 lines directly into your dial plan,
appended somehow to your extensions.conf or extensions_custom.conf files.
;
; Example #1: Simple Mode
; -----------------------
; * PJSIP channel driver.
; * One Remote End.
; * One friend to bridge in.
; * One static call back number.
; * Remapping of 922 -> 933 for testing SIP provider address verification.
[from-internal-custom-abc-example-1]
exten => 922,1,Set(ex1stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC) ; Ready ?
exten => 922,n,NoOp(placeholder) ; TBD
exten => 922,n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com) ; Please copy and change as you wish!
exten => 922,n,Set(ABCTO=933) ; CHANGE ME! Remapping of the dial to another number (if any.)
exten => 922,n,Set(path=PJSIP/${ABCTO}@#YOUR-TRUNK#) ; CHANGE ME! Endpoint section defined in your PJSIP configuration.
exten => 922,n,Set(callback=3035557729) ; CHANGE ME! Your call-back telephone number (probably 10 digits in the USA.)
exten => 922,n,Set(friend=PJSIP/1113) ; CHANGE ME! The local PJSIP endpoint to bridge into the call.
exten => 922,n,Set(abcshrtname=abctest) ; CHANGE ME! Use abctest as the conf account name.
exten => 922,n,Set(ringtime=120) ; MAYBE CHANGE ME! Rings Remote End / path for 2 minutes.
exten => 922,n,AELSub(pngnpbx-abc-simple,${abcshrtname}) ; Simple setup.
exten => 922,n,AELSub(pngnpbx-abc-path,1,${ringtime},${path}) ; Set the first (and only) call path to use on call to Remote End.
exten => 922,n,AELSub(pngnpbx-abc-remote,${callback},static) ; Originate out the path/trunk using your call-back number as the Caller ID number.
exten => 922,n,AELSub(pngnpbx-abc-friend,1,${friend}) ; Bridge in the other attendee automatically.
exten => 922,n,AELSub(pngnpbx-abc-howdy-yall) ; Enter the conference. No more dial plan processing occurs for caller in your CONF file.
;
; Example #2: Using members of Super Awesome Company
; --------------------------------------------------
; * Adds multiple remote paths.
; * Adds call recording.
; * Adds geolocation.
; * Adds additional friend phones.
; * Adds all 15 extension numbers 1101-1115 from basic-pbx sample
; pjsip.conf file as found in ASTERISK certified version 16.3-cert1
; from Dec 2019.
; * Assumes users are all inside of magical imaginary phone booths.
; * Slightly different formatting of exten lines, with 'same' but without '>'.
; (Does the same thing :)
[from-internal-custom-abc-example-2]
exten = 922,1,Set(ex2stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC) ; Ready ?
same = n,NoOp(placeholder) ; TBD
same = n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com) ; Please copy and change as you wish!
same = n,Set(ABCTO=933) ; CHANGE ME! Remapping of the dial to another number (if any.)
same = n,Set(gpsurl=https://abc.penguinpbx.com/loc/) ; CHANGE ME! URL that will be included in Geolocation SIP header.
same = n,Set(path1=DAHDI/#YOUR-TRUNK-1#/${ABCTO}) ; CHANGE ME! Endpoint section defined in your DAHDI(R) configuration.
same = n,Set(path2=PJSIP/${ABCTO}@#YOUR-TRUNK-2#) ; CHANGE ME! A PJSIP endpoint section - used if first path is down/unreachable.
same = n,Set(path3=PJSIP/${ABCTO}@#YOUR-TRUNK-3#) ; CHANGE ME! Yet another endpoint section defined in your PJSIP configuration.
same = n,AELSub(pngnpbx-abc-init,abctest,record,3600,,announce,,,) ; Use abctest as the conf account name, save WAVs, limit to 1 hour, and announce GPS.
same = n,AELSub(pngnpbx-abc-path,1,10,${path1}) ; Set the first call path / trunk name to use on call to Remote End. Ring 10 seconds.
same = n,AELSub(pngnpbx-abc-path,2,60,${path2}) ; Set the second call path - used only on failover of first call path. Ring 1 minute.
same = n,AELSub(pngnpbx-abc-path,3,300,${path3}) ; Set the third call path - used only on failover of second call path. Ring 5 minutes.
same = n,NoOp(About to change flow based on caller ID number.)
same = n,Set(cleancid=${FILTER(0-9a-zA-Z,${CALLERID(num)})})
same = n,Set(gotdp=${DIALPLAN_EXISTS(${CONTEXT},${EXTEN},x${cleancid})})
same = n,GotoIf($[${gotdp}]?x${cleancid})
; C-Level - corner of Park
; These two phones are in the same 1m square open area.
same = n(x1107),NoOp()
same = n(x1111),NoOp()
same = n,AELSub(pngnpbx-abc-gps,,39.73981,-104.99006,5280,feet,${gpsurl}) ; Set Geolocation SIP header to URL and GPS co-ordinates #1.
same = n,AELSub(pngnpbx-abc-sa,144 W Colfax Ave,Denver,CO,80202) ; Street Address, city name, state abbreviation, zip code
same = n,AELSub(pngnpbx-abc-ai,NW corner of Park) ; Additional Information.
same = n,AELSub(pngnpbx-abc-remote,3035557729,static) ; Originate out the trunk(s).
same = n,Goto(muhfriends)
; Customer Experience - in Park but near Memorial
; These four other phones are in another nearby open area.
; With Different Additional Information.
same = n(x1101),NoOp()
same = n(x1102),NoOp()
same = n(x1115),NoOp()
same = n,AELSub(pngnpbx-abc-gps,,39.74007,-104.98912,5280,feet,${gpsurl})
same = n,AELSub(pngnpbx-abc-sa,144 W Colfax Ave,Denver,CO,80202)
same = n,AELSub(pngnpbx-abc-ai,SW of Voorhies Memorial)
same = n,AELSub(pngnpbx-abc-remote,3035557729,static)
same = n,Goto(muhfriends)
; Park Benches for Software Engineers
; Note this uses Plus Codes not "standard" latitude and longitude
same = n(x1110),NoOp()
same = n(x1104),NoOp()
same = n(x1113),NoOp()
same = n(x1114),NoOp()
same = n,AELSub(pngnpbx-abc-gps,85FQP2Q6+H7,,,5280,feet,${gpsurl})
same = n,AELSub(pngnpbx-abc-sa,Unnamed Road,Denver,CO,80202)
same = n,AELSub(pngnpbx-abc-ai,SW corner of Park)
same = n,AELSub(pngnpbx-abc-remote,3035557729,static)
same = n,Goto(muhfriends)
; Directors and all others sit together in the Ampitheater
; Again using Plus Codes - see https://plus.codes/ for more info
same = n(x1103),NoOp()
same = n(x1106),NoOp()
same = n(x1108),NoOp()
same = n,AELSub(pngnpbx-abc-gps,85FQP2Q6+7F,,,5280,feet,${gpsurl})
same = n,AELSub(pngnpbx-abc-sa,101 W 14th Ave,Denver,CO,80202)
same = n,AELSub(pngnpbx-abc-ai,Greek Ampitheater)
same = n,AELSub(pngnpbx-abc-remote,3035557729,static)
same = n,Goto(muhfriends)
; Remote office location in the Mountains for Sales
same = n(x1105),NoOp()
same = n(x1109),NoOp()
same = n(x1112),NoOp()
same = n,AELSub(pngnpbx-abc-gps,,39.588,-105.644,4350,meters,${gpsurl}) ; Set Geolocation SIP header to URL and GPS co-ordinates #2.
same = n,AELSub(pngnpbx-abc-sa,Mount Evans Ridge,Idaho Springs,CO,80452) ; Street Address, city name, state abbreviation, zip Code
same = n,AELSub(pngnpbx-abc-ai,Floor 42) ; Additional Information.
same = n,AELSub(pngnpbx-abc-remote,7205557729,static) ; Originate out the trunk(s) using a different call-back number as the Caller ID number.
same = n,Goto(muhfriends)
same = n(muhfriends),NoOp()
same = n,Log(VERBOSE,Remote dial started. Now adding friends to call.) ; Most critical is the remote call.
same = n,AELSub(pngnpbx-abc-friend,1,PJSIP/1113) ; Bridge in friend.
same = n,AELSub(pngnpbx-abc-friend,2,PJSIP/1111) ; Bridge in another friend.
same = n,AELSub(pngnpbx-abc-friend,3,PJSIP/1109) ; Bridge in yet another friend. (Up to 42 total participants by default.)
same = n,AELSub(pngnpbx-abc-howdy-yall) ; Enter the conference. No more dial plan processing occurs for caller.
;
; Example #3: Dynamic call back numbers for phones without DIDs
; -------------------------------------------------------------
; * Needs two contexts.
; * Adds nine Dynamic Call Back numbers.
; * Adds local call back option with 922*EXTENSION
; * Requires call backs be registered before first use
; by dialing 123*2220*NUMBER
[from-external-custom-abc-example-3]
exten = 3035551111,1,AELSub(pngnpbx-abc-reentry,1,${EXTEN},${abclo}) ; Place the dynamic call back DIDs here, one per line (copy/paste/edit.)
exten = 3035552222,1,AELSub(pngnpbx-abc-reentry,2,${EXTEN},${abclo}) ; Do not change anything except for the phone numbers and position number.
exten = 3035553333,1,AELSub(pngnpbx-abc-reentry,3,${EXTEN},${abclo}) ; You should not provision these DIDs anywhere else in your PBX.
exten = 3035554444,1,AELSub(pngnpbx-abc-reentry,4,${EXTEN},${abclo}) ; This is particularly useful for lobby/waiting area phones without call back numbers.
exten = 3035555555,1,AELSub(pngnpbx-abc-reentry,5,${EXTEN},${abclo}) ; The abclo variable is for loading new call backs into internal AstDB.
exten = 3035556666,1,AELSub(pngnpbx-abc-reentry,6,${EXTEN},${abclo})
exten = 3035557777,1,AELSub(pngnpbx-abc-reentry,7,${EXTEN},${abclo})
exten = 3035558888,1,AELSub(pngnpbx-abc-reentry,8,${EXTEN},${abclo})
exten = 3035559999,1,AELSub(pngnpbx-abc-reentry,9,${EXTEN},${abclo})
[from-internal-custom-abc-example-3]
exten = 922,1,Set(ex3stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
same = n,NoOp(placeholder)
same = n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com) ; Please copy and change as you wish!
same = n,Set(ABCTO=933) ; CHANGE ME! Remapping of the dial to another number (if any.)
same = n,Set(path=PJSIP/${ABCTO}@#YOUR-TRUNK#) ; CHANGE ME! Endpoint section defined in your PJSIP configuration.
same = n,Set(defaultcallback=3035550000) ; CHANGE ME! Default call back number used if dynamic allocation fails.
same = n,Set(friend=PJSIP/1113) ; CHANGE ME! The local PJSIP endpoint to bridge into the call.
same = n,Set(abcshrtname=abctest) ; CHANGE ME! Use abctest as the conf account name.
same = n,Set(ringtime=120) ; MAYBE CHANGE ME! Rings Remote End / path for 2 minutes.
same = n,AELSub(pngnpbx-abc-simple,${abcshrtname}) ; Simple setup.
same = n,AELSub(pngnpbx-abc-path,1,${ringtime},${path}) ; Set the first (and only) call path to use on call to Remote End.
same = n,AELSub(pngnpbx-abc-remote,${defaultcallback},dynamic) ; Originate out the path/trunk using a dynamic call-back number as the Caller ID number.
same = n,AELSub(pngnpbx-abc-friend,1,${friend}) ; Bridge in the other attendee automatically.
same = n,AELSub(pngnpbx-abc-howdy-yall) ; Enter the conference. No more dial plan processing occurs for caller.
exten = _922*XXXX,1,NoOp(get back to conf locally) ; Useful if a friend falls off the wagon. They can get back on the bridge themselves.
exten = _922*XXXX/1113,n,NoOp() ; Check if they are your friend. Based on caller ID number.
exten = _922*XXXX/1107,s,NoOp() ; Didn't try to automatically bridge this friend but let them join later manually.
exten = _922*XXXX/1111,s,NoOp() ; Didn't try to automatically bridge this friend but let them join later manually.
exten = _922*XXXX/1103,s,NoOp() ; Didn't try to automatically bridge this friend but let them join later manually.
exten = _922*XXXX/1106,s,NoOp() ; Didn't try to automatically bridge this friend but let them join later manually.
exten = _922*XXXX,s,Hangup() ; No non-friends allowed.
exten = _922*XXXX,n,NoOp()
same = n,Set(abcconfid=${FILTER(0-9a-zA-Z,${EXTEN:4})})
same = n,Goto(pngnpbx-abc-bridge,${abcconfid},1)
exten = _123*2220*NXXNXXXXXX,1,NoOp(number loading) ; Dial this each time you change dynamic call back DIDs.
same = n,Set(abclo=yes) ; Or you could manually insert entries into AstDB.
same = n,Set(did=${CUT(EXTEN,*,2)}) ; But doing it this way on the phone is probably easier.
same = n,Goto(from-external-custom-abc-example-3,${did},1) ; Also it re-uses the other context so no double-typing of DIDs!
;
; Example #4: Tin Can Mode
; ------------------------
; * Using "Tin Can" mode for Dial to remote instead of Originate.
; * Please see the differences in Modes near the top of this file.
[from-internal-custom-abc-example-4]
exten = 922,1,Set(ex4stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
same = n,NoOp(placeholder)
same = n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com) ; Please copy and change as you wish!
same = n,Set(ABCTO=933) ; CHANGE ME! Remapping of the dial to another number (if any.)
same = n,Set(ABCTRUNK=#YOUR-TRUNK#) ; CHANGE ME! Remapping of the dial to another number (if any.)
same = n,Set(ABCPATH=PJSIP/${ABCTO}@${ABCTRUNK}) ; CHANGE ME! Endpoint section defined in your PJSIP configuration.
same = n,Set(ABCCALLBACK=3035550000) ; CHANGE ME! Default call back number used if dynamic allocation fails.
same = n,Set(ABCFRIEND=PJSIP/1113) ; CHANGE ME! The local PJSIP endpoint to bridge into the call.
same = n,Set(ABCTYPENAME=abcex4) ; CHANGE ME! Use abcex4 as the conf account name.
same = n,Set(ABCRINGTIME=120) ; MAYBE CHANGE ME! Rings Remote End / path for 2 minutes.
same = n,AELSub(pngnpbx-abc-tincan,${ABCTYPENAME}) ; Tin Can mode. Uses Dial instead of Originate to the remote.
same = n,AELSub(pngnpbx-abc-path,1,${ABCRINGTIME},${ABCPATH}) ; Set the first (and only) call path to use on call to Remote End.
same = n,AELSub(pngnpbx-abc-remote,${ABCCALLBACK},static) ; In Tin Can mode, this spawns Originate to a ChanSpy dummy not the Remote End.
same = n,AELSub(pngnpbx-abc-friend,1,${ABCFRIEND}) ; Bridge in the other attendee automatically.
same = n,AELSub(pngnpbx-abc-howdy-yall) ; In Tin Can mode, this dials the remote and then enters the conference after they answer.
; IT DOES NOT IMMEDIATELY PUT THE CALLER INTO THE CONFERENCE BRIDGE.
; IT USES A STANDARD DIAL() TO DIRECTLY ROUTE TO THE REMOTE END.
; IF THE CALLER HANGS UP BEFORE THE REMOTE END ANSWERS IT WILL DROP ON BOTH SIDES.
;
; Example #5: More advanced FreePBX integration
; ---------------------------------------------
; * In Tin Can Mode (Again)
; * Integrates with FreePBX per-device emergency_cid numbers.
; * Copy this context into your /etc/asterisk/extensions_custom.conf file.
; * Just fill in the #XYZ# variables once for your entire system.
; * Then, create a new Custom Destination in FreePBX to point to:
;
; from-internal-custom-abc-example-5,s,1
;
; * Finally, create a new Misc Application in FreePBX to point an
; extension number to the new Custom Destination eg. 933
; * This example uses legacy chan_SIP instead of newer chan_PJSIP
;
[from-internal-custom-abc-example-5]
exten => s,1,Set(ex5stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,n,NoOp(placeholder)
exten => s,n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com)
exten => s,n,Set(cidnum=${FILTER(0-9A-Za-z,${CALLERID(num)})})
exten => s,n,Set(callback=${DB(DEVICE/${cidnum}/emergency_cid)})
exten => s,n,Set(ABCTO=${CALLERID(DNID)})
exten => s,n,Set(path1=SIP/${ABCTO}@#SIPTRUNK-1#) ; chan_sip support
exten => s,n,Set(path2=SIP/${ABCTO}@#SIPTRUNK-2#) ; multiple trunks
exten => s,n,Set(path3=SIP/${ABCTO}@#SIPTRUNK-3#) ; allows failover
exten => s,n,Set(friendAlice=SIP/#SECURITY-EXTENSION#)
exten => s,n,Set(friendBob=SIP/#ERDOCTOR-EXTENSION#)
exten => s,n,Set(vmail1=#FRONTDESK-EXTENSION#@default)
exten => s,n,Set(vmail2=#ITDIRECTOR-EXTENSION#@default)
exten => s,n,Set(abcshrtname=amp)
exten => s,n,Set(ringtime=120)
exten => s,n,Set(vmsecs=3) ; must exceed minsecs in voicemail.conf!
exten => s,n,AELSub(pngnpbx-abc-tincan,${abcshrtname})
exten => s,n,AELSub(pngnpbx-abc-path,1,${ringtime},${path1})
exten => s,n,AELSub(pngnpbx-abc-path,2,${ringtime},${path2})
exten => s,n,AELSub(pngnpbx-abc-path,3,${ringtime},${path3})
exten => s,n,AELSub(pngnpbx-abc-remote,${callback},static)
exten => s,n,AELSub(pngnpbx-abc-friend,1,${friendAlice})
exten => s,n,AELSub(pngnpbx-abc-friend,2,${friendBob})
exten => s,n,AELSub(pngnpbx-abc-vmail,${vmail1}&${vmail2},${vmsecs},0);
exten => s,n,AELSub(pngnpbx-abc-howdy-yall)
;
; Example #6: No Friends just Paladins
; ------------------------------------
; * In Tin Can Mode (Again)
; * Integrates with FreePBX per-device emergency_cid numbers.
; * Creates separate conference for Paladins to discuss amongst themselves.
; * These Palace conferences are separate from Yurt conferences.
; * Does not allow Paladins to interfere in call from OG caller to Remote End.
; * Only feeds in audio to Paladins when Remote End answers the OG caller.
[from-internal-custom-abc-example-6]
exten => s,1,Set(ex6stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,n,NoOp(placeholder)
exten => s,n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com)
exten => s,n,Set(cidnum=${FILTER(0-9A-Za-z,${CALLERID(num)})})
exten => s,n,Set(callback=${DB(DEVICE/${cidnum}/emergency_cid)})
exten => s,n,Set(ABCTO=${CALLERID(DNID)})
exten => s,n,Set(path=SIP/${ABCTO}@#SIPTRUNK#)
exten => s,n,Set(palOliver=SIP/#SHAMAN-EXTENSION#)
exten => s,n,Set(palOrlando=SIP/#MENTALHEALTH-EXTENSION#)
exten => s,n,Set(abcshrtname=amppal)
exten => s,n,Set(ringtime=120)
exten => s,n,AELSub(pngnpbx-abc-tincan,${abcshrtname})
exten => s,n,AELSub(pngnpbx-abc-path,1,${ringtime},${path})
exten => s,n,AELSub(pngnpbx-abc-remote,${callback},static)
exten => s,n,AELSub(pngnpbx-abc-paladin,1,${palOliver},)
exten => s,n,AELSub(pngnpbx-abc-paladin,2,${palOrlando},)
exten => s,n,AELSub(pngnpbx-abc-howdy-yall)
;
; Example #7: Set outbound Caller ID number based on Subnet ID number
; -------------------------------------------------------------------
; * In Tin Can Mode (Yes, Again)
; * Paladins only - nosy ones that cause the Palace to listen to the Yurt.
; * Choose caller ID based on subnet ID - requires new AstDB entries eg...
; sirius*CLI> database put pngnpbx/abc/sbntcid/192.168.1.0 24 3035551234
; sirius*CLI> database put pngnpbx/abc/sbntcid/192.168.2.0 24 3035552222
; sirius*CLI> database put pngnpbx/abc/sbntcid/192.168.3.240 30 3035553333
; sirius*CLI> database put pngnpbx/abc/sbntcid/192.168.3.244 30 3035554444
; sirius*CLI> database put pngnpbx/abc/sbntcid/192.168.3.248 30 3035555555
; sirius*CLI> database put pngnpbx/abc/sbntcid/192.168.4.128 28 7205550000
; * The smallest subnet found is used first (so /30 before /29, down to /24).
; * Defaults to FreePBX emergency CID if no subnet override CID is found.
[from-internal-custom-abc-example-7]
exten => s,1,Set(ex7stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,n,NoOp(placeholder)
exten => s,n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com)
exten => s,n,Set(cidnum=${FILTER(0-9A-Za-z,${CALLERID(num)})})
exten => s,n,Set(defaultcallback=${DB(DEVICE/${cidnum}/emergency_cid)})
exten => s,n,Set(ABCTO=${CALLERID(DNID)})
exten => s,n,Set(path=SIP/${ABCTO}@#SIPTRUNK#)
exten => s,n,Set(palOliver=SIP/#FRONTDESK-EXTENSION#)
exten => s,n,Set(palOrlando=SIP/#SECURITY-EXTENSION#)
exten => s,n,Set(abcshrtname=sbntpal)
exten => s,n,Set(pathringtime=120)
exten => s,n,AELSub(pngnpbx-abc-tincan,${abcshrtname})
exten => s,n,AELSub(pngnpbx-abc-path,1,${pathringtime},${path})
exten => s,n,AELSub(pngnpbx-abc-remote,${defaultcallback},subnet)
exten => s,n,AELSub(pngnpbx-abc-paladin,1,${palOliver},nosy)
exten => s,n,AELSub(pngnpbx-abc-paladin,2,${palOrlando},nosy)
exten => s,n,AELSub(pngnpbx-abc-howdy-yall)
;
; Example #8: Trolls auto-answer in half-duplex AKA "Page Group"
; --------------------------------------------------------------
; * In Tin Can Mode (Yes, Again)
; * Trolls only. They can not talk to anyone in the YURT.
; * Add "nosy" to troll if they should listen to call.
; (Without "nosy" option they will just hear an announcement.)
; * Choose caller ID based on subnet ID.
; * Defaults to FreePBX emergency CID if no subnet override CID is found.
[from-internal-custom-abc-example-8]
exten => s,1,Set(ex8stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,n,NoOp(placeholder)
exten => s,n,Log(VERBOSE,Always Be Conferencing - PenguinPBX.com)
exten => s,n,Set(cidnum=${FILTER(0-9A-Za-z,${CALLERID(num)})})
exten => s,n,Set(defaultcallback=${DB(DEVICE/${cidnum}/emergency_cid)})
exten => s,n,Set(ABCTO=${CALLERID(DNID)})
exten => s,n,Set(path=SIP/${ABCTO}@#SIPTRUNK#)
exten => s,n,Set(trollCharlie=SIP/#FRONTDESK-EXTENSION#)
exten => s,n,Set(trollDwight=SIP/#OVERHEADSPKR-EXTENSION#)
exten => s,n,Set(abcshrtname=sbnttrl)
exten => s,n,Set(pathringtime=120)
exten => s,n,AELSub(pngnpbx-abc-tincan,${abcshrtname})
exten => s,n,AELSub(pngnpbx-abc-path,1,${pathringtime},${path})
exten => s,n,AELSub(pngnpbx-abc-remote,${defaultcallback},subnet)
exten => s,n,AELSub(pngnpbx-abc-troll,1,${trollCharlie},nosy)
exten => s,n,AELSub(pngnpbx-abc-troll,2,${trollDwight},)
exten => s,n,AELSub(pngnpbx-abc-howdy-yall)
;
; Example #9: Do It Yourself DIY
; Global Positioning System GPS
; Interactive Voice Response IVR
; -------------------------------------------
; Minimal design.
; For use in emergency calling location maintenance.
; Lets users better self-manage their information.
[from-internal-custom-abc-example-9]
exten => s,1,Set(ex9stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,2,Goto(pngnpbx-abc-demo,123*222,1) ; as easy as 123*ABC
;
; Example #10: Insta Teams Mode - as host/admin
; ---------------------------------------------
; For use in Work From Home situations (not emergencies.)
; Lets Managers keep in touch with Team members.
; Minimal design.
[from-internal-custom-abc-example-10]
exten => s,1,Set(ex10stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,2,Goto(pngnpbx-abc-demo,222486,1)
; Example #11: Insta Teams Mode - as Team member who just missed a call
; ---------------------------------------------------------------------
; Lets callers get back into the conference.
[from-internal-custom-abc-example-11]
exten => s,1,Set(ex11stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,2,NoOp(TODO)
;
; Example #12: Voicemail Meta-Data Only Notification
; --------------------------------------------------
; Provides voicemail-to-email alert emails only.
; Includes call meta-data such as date and time in the email.
; Does not record any call audio into the attached voicemail.
[from-internal-custom-abc-example-12]
exten => s,1,Set(ex12stamp=${STRFTIME(,UTC,%F %H:%M:%S.%3q)} UTC)
exten => s,2,NoOp(TODO)
;
; Example #13: Really Fast Parallel Dial Method that generates Voicemail
; ----------------------------------------------------------------------
; Easiest integration choice with most existing ASTERISK 13-20.
; Sets up ABC using Dial() application by adding outbound Local channel.
; Change #YOUR-TRUNK# as appropriate per your PJSIP configuration.
; (Should also work with other channel techs eg. SIP, DAHDI, IAX2, OOH323, etc.)
; Note the 'r' option to dial for ring-back -- otherwise it will be silent ring.
; --> Also you must pre-configure the notify-ees' voicemail boxes in abc.conf file,
; but you can probably re-use existing entries (or make new ones -- paying
; attention to 'emailsubject' and 'emailbody' options to clarify the email.)
; Finally, the Parallel VM Mode doesn't actually do any conferencing -- sad ;( --
; but some users want this method of notification -- and ABC can make it easier,
; while integrating other interesting things like GPS/PLUSCODE location info!
[from-internal-custom-abc-example-13]
exten => 922,1,Dial(PJSIP/${EXTEN}@#YOUR-TRUNK#&Local/${EXTEN}@pngnpbx-abc-parallel-vm-notify,,r)
;
; Example #14: Really Fast Parallel Dial Method that generates Pages
; ------------------------------------------------------------------
; Slightly more involved than Example #13 but not by much.
; Allows for near-immediate nofications with minimal impact to your dial plan.
; Plays back A-B-C notes then call meta data info in the Page audio stream
; eg. A-B-C (notes) then "emergency 9 2 2 call from 7 7 7 dash A D A M"
; Change #YOUR-TRUNK# as appropriate per your PJSIP configuration.
; Only tested with PJSIP (as most things in ABC are.)
; --> Remember to add the parapg lines into abc.conf to specify Page-ees.
[from-internal-custom-abc-example-14]
exten => 922,1,Dial(PJSIP/${EXTEN}@#YOUR-TRUNK#&Local/${EXTEN}@pngnpbx-abc-parallel-pg-notify,,r)
;
; Example #15: Really Fast Parallel Dial Method that generates both Voicemails and Pages
; --------------------------------------------------------------------------------------
; Combination of Examples #13 and #14. The best of both worlds.
; Shows different handling based on Caller ID so eg. extension 555 won't Page itself!
; --> Remember to add both paravm and parapg lines into abc.conf for this to work.
[from-internal-custom-abc-example-15]
exten => 922/555,1,Dial(PJSIP/${EXTEN}@#YOUR-TRUNK#&Local/${EXTEN}@pngnpbx-abc-parallel-vm-notify)