Set focus to first form field when Add button is clicked
[ipypbx] / src / ipypbx / models.py
1 # Copyright (c) Stas Shtin, 2010
2
3 # This file is part of IPyPBX.
4
5 # IPyPBX is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # IPyPBX is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with IPyPBX.  If not, see <http://www.gnu.org/licenses/>.
17
18
19 from axiom.item import Item
20 from axiom.attribute import boolean, integer, reference, text
21
22
23 class Connection(Item):
24     name = text()
25     local_ip_address = text()
26     local_port = integer()
27     freeswitch_ip_address = text()
28     freeswitch_port = integer()
29
30
31 class SipProfile(Item):
32     connection = reference()
33     name = text()
34     external_rtp_ip = text()
35     external_sip_ip = text()
36     rtp_ip = text()
37     sip_ip = text()
38     sip_port = integer()
39     accept_blind_registration = boolean()
40     authenticate_calls = boolean()
41     is_active = boolean()
42
43
44 class Domain(Item):
45     sip_profile = reference()
46     host_name = text()
47     is_active = boolean()
48
49
50 class Gateway(Item):
51     sip_profile = reference()
52     name = text()
53     username = text()
54     password = text()
55     realm = text()
56     from_domain = text()
57     expire_in_seconds = integer()
58     retry_in_seconds = integer()
59     caller_id_in_from_field = boolean()
60     is_active = boolean()
61
62
63 class Endpoint(Item):
64     user_id = text()
65     password = text()
66     domain = text()
67     is_active = boolean()
68
69
70 class Extension(Item):
71     destination_match = text()
72     xml_dialplan = text()
73     domain = text()
74     endpoint = reference()
75     authenticate_calls = boolean()
76     is_active = boolean()
77