-
Notifications
You must be signed in to change notification settings - Fork 4
/
readme.txt
405 lines (366 loc) · 22.7 KB
/
readme.txt
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
3CXObjectModel.3.0.0.1_v18.chm - help file for Configuration and Call Control API V18
New Help file includes CallFlow API, CallFlow.CFD API and 3CX Configuration and Call Control API.
OMSamples
.NET Core C# project and CallFlow samples.
#####################
Prerequisites:
1. Stanalone host.
2. User should have administrative rights.
3. .NET core SDK (Microsoft Visual Studio 2017)
4. Test installaion of 3CX Phone System version 16 (or later)
WARNING: DO NOT RUN SAMPLES ON PRODUCTION (LIVE) enviroment
5. requires access to 3CXPhoneSystem.ini
6. Project may require adjustment for the location of 3cxpscomcpp2.dll. The project is configured to take it from the default installation path on Windows platform.
Usage:
dotnet OMSamplesCore.dll ?|SampleName [ [?] | [arg1 [arg2 ...]] ]
List of samples:
SampleName: connection
Implemented in OMSamples.Samples.ActiveConnections
WARNING:
Parameters:
arg1 - dnregs |answer|ondn |all|drop |pickup |divertvm|divert |bargein |listen |whisper|record |transfer|join |makecall|callservice |attacheddata |dn_media_stat|call_media_stat|media_monitor |
arg2 - numstartswith or [all]|achash|dnnum| |achash|achash |achash |achash |achash |achash |achash |achash |achash |achash |reghash |servicename |achach |dn-number |call-id |toshow |
arg3 - additional-keys | | | | |destnum| |destnum|reghash |reghash|reghash|RecordingAction|destnum |achash2|destnum |list of key=value|[list of key=value]|0 or 1 |0 or 1 |all|[dn [...]]|
Description: shows how to work with ActiveConnection objects
--------------------------------------------------------------------------------
SampleName: playlists
Implemented in OMSamples.Samples.PlayListsSample
Parameters:
arg1 - list|create|delete|update. no parameters - checks all audio streams
arg2...argN - [name=AudioFeed.Name] [source=AudioFeed.Source] [autogain|no-audiogain] [shuffle|sorted] [volume=0..100] [no-stopempty|stopempty]
Description: prints, updates, creates, deletes playlists definitions. name source is the selector in update|delete. create - source is autogenerated if not specified. autogain set to false shuffle=false
--------------------------------------------------------------------------------
SampleName: blacklist_monitor
Implemented in OMSamples.Samples.BlackListMonitor
Description: Sample of IP Black List manager
--------------------------------------------------------------------------------
SampleName: callflow
Implemented in OMSamples.Samples.RoutePointSample
Parameters:
arg1 - list|create|delete|update|fromfolder
arg2...argN - [prefix=name_prefix|name=RoutePointName [script=<filename>][force=true]]
Description: prints, updates, creates, deletes callflow script route points. fromfolder creates callflow routing points basing on ralative path of .cs files
--------------------------------------------------------------------------------
SampleName: calls
Implemented in OMSamples.Samples.CallStateMonitor
WARNING:
Parameters:
arg1 - show | monitor
arg2 - callid or 'all' | new or all or callid
Description: Shows how to use CallMonitor
--------------------------------------------------------------------------------
SampleName: change_parkcodes
Implemented in OMSamples.Samples.ChangeParkCodesSample
WARNING: This sample changes global settings of PBX.
Parameters:
arg1 - dial code to park call from the Parking Orbit
arg2 - dial code to unpark call from the Parking Orbit
Description: Shows how to change dial codes of Parking Orbit
--------------------------------------------------------------------------------
SampleName: change_vmbox_info
Implemented in OMSamples.Samples.ChangeVMBoxInfoSample
Parameters:
arg1 - extension number
Description: Sets voicemail box information for the specified extension.
Number of messages is hardcoded and set to 1 new message and 2 messages in total.
--------------------------------------------------------------------------------
SampleName: conference
Implemented in OMSamples.Samples.Conferences
WARNING:
Parameters:
arg1 - active|startadhoc|scheduled|joinaudio |removeschedule|dropall | destroy |add | hold |resume |mute |unmute |drop |resetbridge
arg2 - [id] |pin |[id] |schedule_id |schedule_id |active_id|active_id|active_id |active_id|active_id|active_id|active_id|active_id|
arg3 - |number | | | | | |call_to_number|member_id|member_id|member_id|member_id|member_id|
Description: Commands:
active - list of active audio conferences (including joined)
startadhoc - (not supported) starts adhoc conference. number - add number initial member. pin - if specified as *<extnumber> - private conference of <extnumber> will call the <extnumber> in addition to the specified number scheduled - all scheduled meetings
joinaudio - (not supported) replaces video only schedule with joined conference where viseo and audio conferences can communicate to each other.
removeschedule - deleted schedule of conference. Active conference will continue as ad-hoc audio conference.
dropall - drop all calls in active audio conference. Scheduled conference will be left available until end of schedule. ad-hoc will be terminated
destroy - terminate all calls, delete schedule (if defined). Active conference will become inavailable
add - adds call to specified number to the active conference
hold - put member call on hold
resume - resume member's call
mute - mute incoming stream from member
unmute - remove mute from incoming stream of member
drop - disconenct member of audio conference
resetbridge - reset parameters of the web meeting bridge
--------------------------------------------------------------------------------
SampleName: create_delete_stat
Implemented in OMSamples.Samples.CreateDeleteStatSample
Description: This sample shows how to delete and create Statistics object.
Statistics 'MYSTAT' should be initialized before runing this sample.
(use update_stat sample)
--------------------------------------------------------------------------------
SampleName: create_prompt_set
Implemented in OMSamples.Samples.CreatePromptSetSample
Description: Synthetic sample. It shows how to configure PromptSet object.
--------------------------------------------------------------------------------
SampleName: create_shared_parking
Implemented in OMSamples.Samples.CreateSharedParkingSample
Parameters:
arg1 - name of shared parking place
Description: This sample adds Shared parking place. The name MUST start with 'SP'.
--------------------------------------------------------------------------------
SampleName: parameter
Implemented in OMSamples.Samples.CustomParameters
Parameters:
arg1 - show | set | delete |
arg2 - [partialname] | name | name |
arg3 - | value | |
Description: Updates or sets parameter value
--------------------------------------------------------------------------------
SampleName: deletedn
Implemented in OMSamples.Samples.DeleteDN
WARNING:
Description: removing specifid DN
--------------------------------------------------------------------------------
SampleName: display
Implemented in OMSamples.Samples.DisplayAllSample
Description: Shows information about all Parameters, Codecs, predefined conditions of the rules, IVRs and Extensions.
--------------------------------------------------------------------------------
SampleName: dn_monitor
Implemented in OMSamples.Samples.DNmonitorSample
Description: Shows how to listen for DN updates
--------------------------------------------------------------------------------
SampleName: extension
Implemented in OMSamples.Samples.ExtensionSample
Parameters:
arg1 - show | create | delete | update |lookupemail|duplicate|bulkcreation|bulkdelete|bulkupdate|testmyphonebatch
arg2 - [dn/dnlist]| dn | dn | dn/dnlist |email |fromext |dn/dnlist |dn/dnlist |dn/dnlist |
arg3 - | params | | paramrs | |tonumber | | |params |
Description: Working with Extension. Partial configuration
list_of_parameters is sequence of space separated strings (taken in quotes if required):
FIRST_NAME=<string> - first name
LAST_NAME=<string> - last name
EMAIL=<string> - email
MOBILE=<numric string> - mobile number
OUTBOUND_CALLER_ID=<numeric string> - mobile number
profile.<AvailableProfileNAME>=AV(NA:<DestinationType>.[<number>].[<externalnumber>],[+|-]NAI:<DestinationType>.[<number>].[<externalnumber>],BUSY:<DestinationType>.[<number>].[<externalnumber>],[+|-]BUSYI:<DestinationType>.[<number>].[<externalnumber>])
profile.<AwayProfileNameNAME>=AW(IALL:<DestinationType>.[<dnnumber>].[<externalnumber>],[+|-]IOOO:<DestinationType>.[<number>].[<externalnumber>],EALL:<DestinationType>.[<number>].[<externalnumber>],[+|-]EOOO:<DestinationType>.[<number>].[<externalnumber>])
CURRENT_STATUS=<profilename> - name of the current profile
prop.<NAME>=<value> - set DN property with name <NAME> to the <value>
OVERRIDE_STATUS=<profilename>,<timespan>
BINDTOMS=true|false
REINVITES=true|false
REPLACES=true|false
RECORDCALLS=true|false
SRTP=true|false
SRTPMODE={SRTPDisabled|SRTPEnabled|SRTPEnforced}
Extension.<extension_simple_property>=<propval>
AGENTLOGIN=<listofqueues> AGENTLOGOUT=<listofqueues>
--------------------------------------------------------------------------------
SampleName: ext_line_rule_update
Implemented in OMSamples.Samples.ExternalLineRuleUpdateSample
WARNING: This sample will modify destination of existing rules. Line should be recreated after this test
Parameters:
arg1 - Virtual extension number of the line
arg2 - destination Local DN
Description: This sample shows how to change destination of ExternalLineRule
--------------------------------------------------------------------------------
SampleName: fax
Implemented in OMSamples.Samples.FaxExtensionSample
Parameters:
arg1 - show |create | update |delete
arg2 - [dnnumber]|dnnumber | dnnumber |dnnumber
arg3 - |parameters| parameters|
arg4...argN - parameters:
AUTHID=<alfanumeric_string> -
AUTHPASS=<alfanumeric_string> - alfanumeric string
OUTBOUND_CALLER_ID=<numeric string> - outbound called if for calls originated by the device prop.<NAME>=<value> - set DN property with naem <NAME> to the <value>
Description: Shows how to work with FaxExtension object
--------------------------------------------------------------------------------
SampleName: inboundrule
Implemented in OMSamples.Samples.ExternalLineRule
Parameters:
arg1 - showall | update
arg2 - [lineDN] | lineDN
arg3 - | ruleID
arg4 - | <All|InOffice|OutOfOffice>.<DestinationType>.[DN].[ExternalNumber]>
Description: Set inbound rule destination
--------------------------------------------------------------------------------
SampleName: invoke
Implemented in OMSamples.Samples.InvokeSample
Parameters:
arg1 - command which should be invoked
arg2, arg3 and so on - additional parameters for Invoke method - each additional parameter should be set as parameter_name=parameter_value
Description: Shows how to use PhoneSystem.Invoke() method
--------------------------------------------------------------------------------
SampleName: ivr
Implemented in OMSamples.Samples.IVRSample
Parameters:
arg1 - show | create | delete | update
arg2 - [ivr number]| ivrnumber | ivrnumber | ivrnumber
arg3 - | list_of_parameters| | list_of_parameters
Description: Working with IVR.
list_of_parameters is sequence of space separated strings (taken in quotes if required):
PROMPT=filename|EXT<extnumber> - file which is placed in directory specified by IVRPROMPTPATH parameter or extnumber where from to record new fine with random name
O<digit>=<IVRForwardType>.[<dnnumber>] - assign specific type of destination to option <digit>. <IVRForward> is from enum IVRForwardType <dnnumber> - local number must be proper for specific number
TO=<seconds> - number of seconds
TODEST=<IVRForwardType>.[<dnnumber>] - timeout action - same as for options
NAME=<ivr name> - name of ivr prop.<NAME>=<value> - set DN property with naem <NAME> to the <value>
--------------------------------------------------------------------------------
SampleName: notifications
Implemented in OMSamples.Samples.NotificationsMonitorSample
Parameters:
arg1 - Object type name
Description: Shows update notifications of specified data class. All notifications will be shown if arg1 is not specified
--------------------------------------------------------------------------------
SampleName: omlookup
Implemented in OMSamples.Samples.OMLookup
Description: Shows how to use OMLookup to make custom lookup collection of objects. sample is for Extension.EmailAddress
--------------------------------------------------------------------------------
SampleName: outboundrule
Implemented in OMSamples.Samples.OutboundRuleSample
Parameters:
arg1 - show | create | update | delete | gateways
arg2 - [name] | parameters | id | id |
arg3 - | | parameters|
Description: Working with OurboundRule.
list_of_parameters is sequence of space separated strings (taken in quotes if required):
NAME=<name>. checked for uniqueness PREFIX=<commaseparated list of prefixes>
PRIORITY=<priority> - no check.
NUMBERLENGTH=<comma separated list of length ranges>
DNRANGES=<comma separated list of dn ranges>
GROUPS=<comma separated list of groups>
ROUTE<N>=<strip>.<prepend>.<gatewayid>
--------------------------------------------------------------------------------
SampleName: park_orbit_monitor
Implemented in OMSamples.Samples.ParkOrbitMonitorSample
Description: Monitors activity of legacy Parking Orbit. *0/*1 dial code
--------------------------------------------------------------------------------
SampleName: phonebook
Implemented in OMSamples.Samples.PhoneBookSample
Parameters:
arg1 - show |lookup | create | update | delete
arg2 - 'all'|'company'|dnnumber |'company'|dnnumber]| ['company'|dnnumber]| ID | ID
arg3...agrN - |lookup_parameters | content_parameters | content_parameters|
Description: Working with PhoneBook
Where:
lookup_parameters: <number to lookup> <minmatch>
content_parameters: [PhoneBookEntry property name]=<string> - contact first name
--------------------------------------------------------------------------------
SampleName: queue
Implemented in OMSamples.Samples.QueueSample
Parameters:
arg1 - show | create | update | delete
arg2 - [qnumber]| qnumber | qnumber | qnumber
arg3 - | parameters | parameters|
Description: Working with Queues.
parameters is sequence of space separated strings (taken in quotes if required):
NAME=<queue name> - name of the queue
PSTRATEGY=<Queue.PollingStrategyType> - polling strategy as named in Queue.PollingStrategyType
POLLINGTIME=<seconds> - ringing time for polling callss
INTRO=filename - intro prompt of the queue - the file which is loacted in the directory specified by IVRPROMPTPATH parameter.
MOH=filename - Music On Hold for calls which are waiting in the queue
AGENTS=<dnnumber>[,<dnnumber>] - list of queue agents
MANAGERS=<dnnumber>[,<dnnumber>] - list of queue managers
MAXWAIT=<seconds> - maximal time of waiting in the queue.
NOANSWERDEST=<DestinationType>.[<dnnumber>].[<externalnumber>] - timeout action - same as for options
LOGIN=<dnnumber>[,<dnnumber>] - Agents to login into the queue
LOGOUT=<dnnumber>[,<dnnumber>] - Agents to logout from the queue
prop.<NAME>=<value> - set DN property with naem <NAME> to the <value>
--------------------------------------------------------------------------------
SampleName: qlogin
Implemented in OMSamples.Samples.QueueLogin
WARNING: changes login status of the agent in queues
Parameters:
arg1 - login_all|logout_all|login_current|logout_current|login_only_to|logout_only_from|show_status
arg2 - agent_extension_number
arg3...argN - specified list of the queues where action specified by arg1 should be applied
Description: shows how to change status of the agent in the queue.
--------------------------------------------------------------------------------
SampleName: refresh_line_registration
Implemented in OMSamples.Samples.RefreshLineRegistrationSample
Parameters:
arg1 - Virtual extension number of External Line
Description: Shows how to refresh registration on VoIP provider Line
--------------------------------------------------------------------------------
SampleName: resetconnection
Implemented in OMSamples.Samples.ResetConnection
no description
--------------------------------------------------------------------------------
SampleName: ringgroup
Implemented in OMSamples.Samples.RingGroupSampel
Parameters:
arg1 - show | create | update | delete
arg2 - [rgnumber]| rgrnumber | rgnumber | rgnumber
arg3 - | parameters | parameters|
Description: Working with RingGroup.
list_of_parameters is sequence of space separated strings (taken in quotes if required):
NAME=<queue name> - name of the queue
STRATEGY=<RingGroup.StrategyType> - polling strategy as named in Queue.PollingStrategyType
AGENTS=<dnnumber>[,<dnnumber>] - list of riggroup
RINGTIME=<seconds> - ring timeout.
NOANSWERDEST=<DestinationType>.[<dnnumber>].[<externalnumber>] - timeout action - same as for options
prop.<NAME>=<value> - set DN property with naem <NAME> to the <value>
NOTE: RingGroup with Paging strategy can be configured to use multicast transport instead of making calls to each of members.
To set/reset usage of multicast, set/reset following DN properties of the Paging ringgroup:
MULTICASTADDR=<muilticatIP>
MULTICASTPORT=<multocastport>
MULTICASTCODEC=<multicastcodec>
MULTICASTPTIME=<codecptime>
--------------------------------------------------------------------------------
SampleName: scriptdev
Implemented in OMSamples.Samples.ScriptDevelopment
WARNING: Some actions of this sample may override existing configuration. DON'T use it on production environment
Parameters:
arg1 - deployandcall|testcall |check |showfailed|online
arg2 - RoutePointDN |RoutePointDN|[RoutePointDN ...]| |
arg3 - filename |toDN | | |
Description: Shows how to make simple verification of the prepared script. Check deploy as RoutePoint and make test call.
--------------------------------------------------------------------------------
SampleName: serialization
Implemented in OMSamples.Samples.Serialization
WARNING: Deserialization modifies configuration (adds or modify objects)
Parameters:
arg1 - serialize | deserialize
arg2 - xmlfile | xmlfile
arg3 - <objtype> |
Description: Shows how to use serialization subsystem of Object model
--------------------------------------------------------------------------------
SampleName: musiconhold
Implemented in OMSamples.Samples.MusicOnHold
WARNING: modifies configuration.
Parameters:
arg1...argN - music on hold source in form ENTITY=source where ENTITY is PARAMETER name where source is stored (see array of names in code) or DN.Number of the queue. if no parametest provided - shows full list of configured objects and checks validity of the source
Description: shows how to change music on hold settings
--------------------------------------------------------------------------------
SampleName: officehours
Implemented in OMSamples.Samples.SetOfficeHoursSample
WARNING: This sample can modify office hours/breaktime of objects.
Parameters:
arg1 - show | setofficetime | setbreaktime |setholiday |removeholiday
arg2 - [holidays|office|dn] | "office" or dnnumber| "office" or dnnumber|nameofholiday |nameofholiday
arg3 - [dnnumber or name of holiday]| RuleHoursType | RuleHoursType |yyyy-MM-dd=[hh\:mm]]|
arg4...agrN - | [list_of_ranges] |[list_of_ranges] |yyyy-MM-dd=[hh\:mm]]|
Description: Shows how to work with Schedule object and holidays.
list_of_ranges is sequence of the strings. Modifications are applied only for specified days. to clear schedule of specific DayOfWeek set it empty{}
DayOfWeek=[start-end][,start-end]...
--------------------------------------------------------------------------------
SampleName: statmonitor
Implemented in OMSamples.Samples.StatisticsMonitorSample
Parameters:
arg1..agrN - Statistics
Description: Shows notificatins for specific statistics object.
--------------------------------------------------------------------------------
SampleName: update_stat
Implemented in OMSamples.Samples.UpdateStatSample
Description: This sample creates and continuously update Statistic object named 'MYSTAT'. After running this sample statistics 'MYSTAT' will be available for create_delete_stat sample
--------------------------------------------------------------------------------
SampleName: groups
Implemented in OMSamples.Samples.OMSamples.Samples.GroupSample
Parameters:
arg1..argN - [group=groupname [dns=[[+-]dnnumber[,...]] [role=rolename] [{<right>=[true|false]}]]
Description: Shows how to set or update rights.
Supports bulk updates when dns parameter is specified. dns support * as placeholder of all gorup memebers
Examples:
groups group=<groupname> dns=* role=users
sets users role to all dnsgroups group=<groupname> dns=101,+100,-200 ......
100 will be added with specified role and overrides. if 100 already exists + is ignored
200 will be removed.
101 overrides will be joined with existing and role will be set to the requested value
NOTE: if role is specified - it will be overwriten for all mentioned extensions. if role is not specified - new members will be created with users role
if members are not specified - the specifed role rights will be updated. tole is mandatory in this case
The described limitations are the limitations of this sample implementation. PBX allows to make any modifications with group update
--------------------------------------------------------------------------------