root/freepbx/tags/2.8.0/amp_conf/htdocs_panel/RECIPES

Revision 8095, 2.5 kB (checked in by drmessano, 4 years ago)

--

Line 
1 RECIPE 1
2 --------
3 Set DND (Do not disturb) from your dialplan and
4 reflect the status on FOP:
5
6 # Example on setting DND state from the dialplan
7 # *78 Sets DND ON
8 # *79 Sets DND OFF
9 #
10 # This example only sets the dnd db value and
11 # signals FOP to display the status on the button
12 # you might have to add a check in your stdexten
13 # macro to honour the DND status
14
15 in extensions.conf:
16
17 exten => *78,1,Set(DB(dnd/${CUT(CHANNEL|-|1)})=Break)
18 exten => *78,n,UserEvent(ASTDB|Channel: ${CHANNEL}^Family: dnd^Value: Break)
19 exten => *78,n,Hangup
20
21 exten => *79,1,Set(DB(dnd/${CUT(CHANNEL|-|1)})=)
22 exten => *79,n,UserEvent(ASTDB|Channel: ${CHANNEL}^Family: dnd^Value: ^)
23 exten => *79,n,Hangup
24
25 in op_astdb.cfg:
26
27 [dnd]
28 settext=DND: ${value}|
29 fopledcolor=0x001020^0|0x00A000^0
30
31 in op_buttons.cfg
32
33 [SIP/1234]
34 ..
35 astdbkey=SIP/1234
36
37 RECIPE 2
38 --------
39 How to monitor rxfax. This is just a barebones sample, you can
40 customize it for your needs. You have to Goto to the fax context
41 from your dialplan:
42
43 in extensions.conf:
44
45 exten => fax,1,Goto(rxfax,s,1)
46
47 [rxfax]
48 exten => s,1,Set(FAXFILE=/var/spool/fax/fax-${TIMESTAMP}.tif)
49 exten => s,2,Set(LOCALSTATIONID=My Company)
50 exten => s,3,UserEvent(Newexten|Channel: FAX/FAX-${UNIQUEID}^State: Up^Uniqueid: 1234)
51 exten => s,4,rxfax(${FAXFILE})
52 exten => s,5,Hangup()
53 exten => t,1,Hangup()
54 exten => h,1,UserEvent(Hangup|Channel: FAX/FAX-${UNIQUEID}^State: Down^Uniqueid: 1234)
55
56 in op_buttons.cfg:
57 [FAX/FAX]
58 Position=1
59 Label="Fax"
60
61
62
63 RECIPE 3
64 --------
65 How to monitor voicemailmain (users entering the voicemail application)
66 You have to define a regular extensions that performs a 'Goto' to the
67 vmail context (similar to the fax case above)
68
69 in extensions.conf:
70
71 [vmail]
72 exten => s,1,SetLanguage(es)
73 exten => s,2,UserEvent(Newexten|Channel: VMAIL/VMAIL-${UNIQUEID}^State: Up^Uniqueid: 4321)
74 exten => s,3,VoicemailMain(${CALLERIDNUM}@internos)
75 exten => t,1,Hangup
76 exten => h,1,NoOp(Hangup en voicemail)
77 exten => h,2,UserEvent(Hangup|Channel: VMAIL/VMAIL-${UNIQUEID}^State: Down^Uniqueid: 4321)
78 exten => h,3,Hangup
79
80 in op_buttons.cfg:
81
82 [VMAIL/VMAIL]
83 Position=1
84 Label="Voicemail"
85
86 RECIPE 4
87 --------
88 Show day/night mode based on an asterisk db value:
89
90 in extensions.conf:
91
92 exten => 80,1,DBPut(daymode/DAYMODE=Day);
93 exten => 80,2,UserEvent(ASTDB|Family: daymode^Channel: daymode^Value: Day)
94 exten => 80,3,Hangup
95 ;
96 exten => 81,1,DBPut(daymode/DAYMODE=Night);
97 exten => 81,2,UserEvent(ASTDB|Family: daymode^Channel: daymode^Value: Night)
98 exten => 81,3,Hangup
99
100 in op_astdb.cfg:
101
102 [daymode]
103 setlabel=${value}
104  
Note: See TracBrowser for help on using the browser.