-
Notifications
You must be signed in to change notification settings - Fork 4
/
module.html
77 lines (72 loc) · 1.92 KB
/
module.html
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
<script type="text/x-red" data-template-name="asterisk-controller">
<div class="form-row">
<label for="node-config-input-host"><i class="icon-bookmark"></i> AGI Host</label>
<input type="text" id="node-config-input-host">
</div>
<div class="form-row">
<label for="node-config-input-port"><i class="icon-bookmark"></i> AGI Port</label>
<input type="text" id="node-config-input-port">
</div>
</script>
<script type="text/x-red" data-template-name="asterisk-in">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-code"><i class="icon-tag"></i> Code</label>
<input type="text" id="node-input-code" placeholder="Name">
</div>
<div class="form-row">
<label for="node-input-controller"><i class="icon-bookmark"></i> Controller</label>
<input type="text" id="node-input-controller">
</div>
</script>
<script type="text/x-red" data-help-name="asterisk-in">
<p>
AGI connection
</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('asterisk-controller', {
category: 'config',
defaults: {
host: {
value: "0.0.0.0",
required: false
},
port: {
value: 14000,
required: true,
validate: RED.validators.number()
}
},
label: function() {
return "agi://" + this.host + ":" + this.port;
}
});
</script>
<script type="text/javascript">
RED.nodes.registerType('asterisk-in', {
category: 'input',
color: '#F78B39',
defaults: {
name: {
value: ""
},
code: {
value: ""
},
controller: {
value: "",
type: "asterisk-controller"
}
},
inputs: 0,
outputs: 1,
icon: "bridge.png",
label: function() {
return (this.name||"asterisk");
}
});
</script>