-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrayo_elements.c
146 lines (132 loc) · 3.58 KB
/
rayo_elements.c
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
/*
* mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2013-2018, Grasshopper
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
*
* The Initial Developer of the Original Code is Grasshopper
* Portions created by the Initial Developer are Copyright (C)
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Chris Rienzo <chris.rienzo@grasshopper.com>
*
* rayo_elements.c -- Rayo XML element definition
*
*/
#include "rayo_elements.h"
/**
* <input> component validation
*/
ELEMENT(RAYO_INPUT)
ATTRIB(xmlns,, any)
STRING_ATTRIB(mode, any, "any,dtmf,voice,cpa")
OPTIONAL_ATTRIB(terminator,, dtmf_digit)
ATTRIB(recognizer,, any)
ATTRIB(language, en-US, any)
ATTRIB(initial-timeout, -1, positive_or_neg_one)
ATTRIB(inter-digit-timeout, -1, positive_or_neg_one)
ATTRIB(sensitivity, 0.5, decimal_between_zero_and_one)
ATTRIB(min-confidence, 0, decimal_between_zero_and_one)
ATTRIB(max-silence, -1, positive_or_neg_one)
STRING_ATTRIB(match-content-type, application/nlsml+xml, "application/nlsml+xml")
/* internal attribs for prompt support */
ATTRIB(barge-event, false, bool)
ATTRIB(start-timers, true, bool)
ELEMENT_END
/**
* <join> command validation
*/
ELEMENT(RAYO_JOIN)
ATTRIB(xmlns,, any)
STRING_ATTRIB(direction, duplex, "send,recv,duplex")
STRING_ATTRIB(media, bridge, "bridge,direct")
ATTRIB(call-uri,, any)
ATTRIB(mixer-name,, any)
ELEMENT_END
/**
* <output> component validation
*/
ELEMENT(RAYO_OUTPUT)
ATTRIB(xmlns,, any)
ATTRIB(start-offset, 0, not_negative)
ATTRIB(start-paused, false, bool)
ATTRIB(repeat-interval, 0, not_negative)
ATTRIB(repeat-times, 1, not_negative)
ATTRIB(max-time, -1, positive_or_neg_one)
ATTRIB(renderer,, any)
ATTRIB(voice,, any)
STRING_ATTRIB(direction, out, "out,in")
ELEMENT_END
/**
* <output><seek> validation
*/
ELEMENT(RAYO_OUTPUT_SEEK)
ATTRIB(xmlns,, any)
STRING_ATTRIB(direction,, "forward,back")
ATTRIB(amount,-1, positive)
ELEMENT_END
/**
* <prompt> component validation
*/
ELEMENT(RAYO_PROMPT)
ATTRIB(xmlns,, any)
ATTRIB(barge-in, true, bool)
ELEMENT_END
/**
* <receivefax> command validation
*/
ELEMENT(RAYO_RECEIVEFAX)
ATTRIB(xmlns,, any)
ELEMENT_END
/**
* <record> component validation
*/
ELEMENT(RAYO_RECORD)
ATTRIB(xmlns,, any)
ATTRIB(format, wav, any)
ATTRIB(start-beep, false, bool)
ATTRIB(stop-beep, false, bool)
ATTRIB(start-paused, false, bool)
ATTRIB(max-duration, -1, positive_or_neg_one)
ATTRIB(initial-timeout, -1, positive_or_neg_one)
ATTRIB(final-timeout, -1, positive_or_neg_one)
STRING_ATTRIB(direction, duplex, "duplex,send,recv")
ATTRIB(mix, false, bool)
ELEMENT_END
/**
* <sendfax> command validation
*/
ELEMENT(RAYO_SENDFAX)
ATTRIB(xmlns,, any)
ELEMENT_END
/**
* <app> command validation
*/
ELEMENT(RAYO_APP)
ATTRIB(xmlns,, any)
ATTRIB(app,, any)
OPTIONAL_ATTRIB(args,, any)
ELEMENT_END
/* For Emacs:
* Local Variables:
* mode:c
* indent-tabs-mode:t
* tab-width:4
* c-basic-offset:4
* End:
* For VIM:
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
*/