Added extension field to gateway. Create server object when a new connection is created
authorStas Shtin <antisvin@gmail.com>
Thu, 15 Apr 2010 10:33:03 +0000 (14:33 +0400)
committerStas Shtin <antisvin@gmail.com>
Thu, 15 Apr 2010 10:33:03 +0000 (14:33 +0400)
src/ipypbx/controllers.py
src/ipypbx/create.sql
src/ipypbx/locale/ipypbx_fi.po
src/ipypbx/locale/ipypbx_fi.ts
src/ipypbx/locale/ipypbx_ru.po
src/ipypbx/locale/ipypbx_ru.ts
src/ipypbxweb/models.py
ui/layout.ui

index 7bdceb2..5285e28 100644 (file)
@@ -160,6 +160,7 @@ class BaseController(QtCore.QObject):
         # Default signals handle row selection, Add and Save buttons.
         return [
             (getattr(self.views, self.basename + 'Add'), 'clicked()', self.add),
+            (self.model, 'primeInsert(int,QSqlRecord&)', self.objectAdded),
             (self.view_list.selectionModel(),
              'currentRowChanged(QModelIndex,QModelIndex)',
              self.view_display, 'setCurrentModelIndex(QModelIndex)'),
@@ -237,12 +238,11 @@ class ConnectionController(BaseController):
             #    self.add()
         
 
-    def connectionAdd(self):
+    def objectAdded(self, row, record):
         """
         New connection added.
         """
-        num_rows = self.model.rowCount()
-        
+        self.addServer(record.value('host'), record.value('port'))        
         
     def addServer(self, host, port):
         """
@@ -266,7 +266,6 @@ class ConnectionChangeListenerController(BaseController):
         connection_controller = self.parent().controllers['connection']
         
         signals = [
-            (self.model, 'primeInsert(int,QSqlRecord&)', self.setConnectionId),
             (connection_controller.view_list.selectionModel(),
              'currentRowChanged(QModelIndex,QModelIndex)',
              self.connectionChange)]
@@ -292,7 +291,7 @@ class ConnectionChangeListenerController(BaseController):
             if not self.model.rowCount():
                 self.add()
 
-    def setConnectionId(self, row, record):
+    def objectAdded(self, row, record):
         """
         Set connection_id from currently selected connection.
         """
@@ -345,6 +344,7 @@ class GatewayController(ConnectionChangeListenerController):
         QtCore.QT_TRANSLATE_NOOP('MainWindow', 'Password'),
         QtCore.QT_TRANSLATE_NOOP('MainWindow', 'Realm'),
         QtCore.QT_TRANSLATE_NOOP('MainWindow', 'From Domain'),
+        QtCore.QT_TRANSLATE_NOOP('MainWindow', 'Extension'),
         QtCore.QT_TRANSLATE_NOOP('MainWindow', 'Expire In Seconds'),
         QtCore.QT_TRANSLATE_NOOP('MainWindow', 'Retry In Seconds'),
         QtCore.QT_TRANSLATE_NOOP('MainWindow', 'Caller ID In From Field'),
index c587abf..3d43168 100644 (file)
@@ -38,6 +38,7 @@ CREATE TABLE "ipypbxweb_gateway" (
     "password" varchar(100) NOT NULL,
     "realm" varchar(100) NOT NULL,
     "from_domain" varchar(100) NOT NULL,
+    "extension" varchar(100) NOT NULL,
     "expire_in_seconds" integer unsigned NOT NULL,
     "retry_in_seconds" integer unsigned NOT NULL,
     "caller_id_in_from_field" bool NOT NULL,
index 0d1904d..b685721 100644 (file)
@@ -16,19 +16,19 @@ msgid "IPyPBX"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "Name"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 #, fuzzy
 msgid "Local Port"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 #, fuzzy
 msgid "Freeswitch Port"
 msgstr ""
@@ -40,7 +40,7 @@ msgid "Local IP address"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 #, fuzzy
 msgid "Freeswitch IP Address"
 msgstr ""
@@ -64,49 +64,49 @@ msgid "Connections"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 #, fuzzy
 msgid "External RTP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 #, fuzzy
 msgid "External SIP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 #, fuzzy
 msgid "RTP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 #, fuzzy
 msgid "SIP IP"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 #, fuzzy
 msgid "SIP Port"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 #, fuzzy
 msgid "Accept Blind Registration"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "Authenticate Calls"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "Is Active"
 msgstr ""
@@ -118,7 +118,7 @@ msgid "SIP Profiles"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:230
+#: src/ipypbx/controllers.py:325
 #, fuzzy
 msgid "Host Name"
 msgstr ""
@@ -136,37 +136,37 @@ msgid "Domains"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "Username"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:263
+#: src/ipypbx/controllers.py:361
 #, fuzzy
 msgid "Password"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "Realm"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "From Domain"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "Expire In Seconds"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "Retry In Seconds"
 msgstr ""
@@ -184,7 +184,7 @@ msgid "Gateways"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:263
+#: src/ipypbx/controllers.py:361
 #, fuzzy
 msgid "User ID"
 msgstr ""
@@ -202,13 +202,13 @@ msgid "Endpoints"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "XML Dialplan"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "Destination Match"
 msgstr ""
@@ -226,43 +226,49 @@ msgid "Extensions"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 #, fuzzy
 msgid "Local IP Address"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "Connection ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "SIP Profile ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 #, fuzzy
 msgid "Caller ID In From Field"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "Domain ID"
 msgstr ""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 #, fuzzy
 msgid "Endpoint ID"
 msgstr ""
+
+#. ts-context MainWindow
+#: src/ipypbx/controllers.py:339
+#, fuzzy
+msgid "Extension"
+msgstr ""
index f4eb587..e3aaefc 100644 (file)
@@ -8,17 +8,17 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Name</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Local Port</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Freeswitch Port</source>
         <translation type="unfinished"></translation>
     </message>
@@ -28,7 +28,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Freeswitch IP Address</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>External RTP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>External SIP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>RTP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>SIP IP</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>SIP Port</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>Accept Blind Registration</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Authenticate Calls</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Is Active</source>
         <translation type="unfinished"></translation>
     </message>
@@ -93,7 +93,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="230"/>
+        <location filename="src/ipypbx/controllers.py" line="325"/>
         <source>Host Name</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Username</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="263"/>
+        <location filename="src/ipypbx/controllers.py" line="361"/>
         <source>Password</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Realm</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>From Domain</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Expire In Seconds</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Retry In Seconds</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="263"/>
+        <location filename="src/ipypbx/controllers.py" line="361"/>
         <source>User ID</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>XML Dialplan</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Destination Match</source>
         <translation type="unfinished"></translation>
     </message>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Local IP Address</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Connection ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>SIP Profile ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Caller ID In From Field</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Domain ID</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Endpoint ID</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
+        <source>Extension</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 </TS>
index f0cf7e2..b4fec3b 100644 (file)
@@ -15,17 +15,17 @@ msgid "IPyPBX"
 msgstr "IPyPBX"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "Name"
 msgstr "Имя"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 msgid "Local Port"
 msgstr "Локальный порт"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 msgid "Freeswitch Port"
 msgstr "Порт Freeswitch"
 
@@ -35,7 +35,7 @@ msgid "Local IP address"
 msgstr "Локальный IP-адрес"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 msgid "Freeswitch IP Address"
 msgstr "IP-адрес Freeswitch"
 
@@ -55,42 +55,42 @@ msgid "Connections"
 msgstr "Подключения"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 msgid "External RTP IP"
 msgstr "Внешний RTP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 msgid "External SIP IP"
 msgstr "Внешний SIP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 msgid "RTP IP"
 msgstr "RTP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 msgid "SIP IP"
 msgstr "SIP IP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 msgid "SIP Port"
 msgstr "Порт SIP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:211
+#: src/ipypbx/controllers.py:306
 msgid "Accept Blind Registration"
 msgstr "Безусловная регистрация"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "Authenticate Calls"
 msgstr "Аутентифицировать звонки"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "Is Active"
 msgstr "Активен"
 
@@ -100,7 +100,7 @@ msgid "SIP Profiles"
 msgstr "Профили SIP"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:230
+#: src/ipypbx/controllers.py:325
 msgid "Host Name"
 msgstr "Имя хоста"
 
@@ -115,32 +115,32 @@ msgid "Domains"
 msgstr "Домены"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "Username"
 msgstr "Имя пользователя"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:263
+#: src/ipypbx/controllers.py:361
 msgid "Password"
 msgstr "Пароль"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "Realm"
 msgstr "Realm"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "From Domain"
 msgstr "Домен в поле \"From\""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "Expire In Seconds"
 msgstr "Время регистрации в секундах"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "Retry In Seconds"
 msgstr "Время повтора в секундах"
 
@@ -155,7 +155,7 @@ msgid "Gateways"
 msgstr "Сетевой шлюз"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:263
+#: src/ipypbx/controllers.py:361
 msgid "User ID"
 msgstr "Идентификатор пользователя"
 
@@ -170,12 +170,12 @@ msgid "Endpoints"
 msgstr "Конечное оборудование"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "XML Dialplan"
 msgstr "План нумерации XML"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "Destination Match"
 msgstr "Совпадение направления"
 
@@ -190,36 +190,42 @@ msgid "Extensions"
 msgstr "Номера"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "ID"
 msgstr "Идентификатор"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:179
+#: src/ipypbx/controllers.py:197
 msgid "Local IP Address"
 msgstr "Локальный IP-адрес"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "Connection ID"
 msgstr "Идентификатор соединения"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "SIP Profile ID"
 msgstr "Идентификатор SIP-профиля"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:243
+#: src/ipypbx/controllers.py:339
 msgid "Caller ID In From Field"
 msgstr "Идентификатор вызывающего абонента в поле \"От\""
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "Domain ID"
 msgstr "Идентификатор домена"
 
 #. ts-context MainWindow
-#: src/ipypbx/controllers.py:277
+#: src/ipypbx/controllers.py:376
 msgid "Endpoint ID"
 msgstr "Идентификатор конечного оборудования"
+
+#. ts-context MainWindow
+#: src/ipypbx/controllers.py:339
+#, fuzzy
+msgid "Extension"
+msgstr ""
index c174009..3192183 100644 (file)
@@ -8,17 +8,17 @@
         <translation>IPyPBX</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Name</source>
         <translation>Имя</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Local Port</source>
         <translation>Локальный порт</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Freeswitch Port</source>
         <translation>Порт Freeswitch</translation>
     </message>
@@ -28,7 +28,7 @@
         <translation>Локальный IP-адрес</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Freeswitch IP Address</source>
         <translation>IP-адрес Freeswitch</translation>
     </message>
         <translation>Подключения</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>External RTP IP</source>
         <translation>Внешний RTP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>External SIP IP</source>
         <translation>Внешний SIP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>RTP IP</source>
         <translation>RTP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>SIP IP</source>
         <translation>SIP IP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>SIP Port</source>
         <translation>Порт SIP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="211"/>
+        <location filename="src/ipypbx/controllers.py" line="306"/>
         <source>Accept Blind Registration</source>
         <translation>Безусловная регистрация</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Authenticate Calls</source>
         <translation>Аутентифицировать звонки</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Is Active</source>
         <translation>Активен</translation>
     </message>
@@ -93,7 +93,7 @@
         <translation>Профили SIP</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="230"/>
+        <location filename="src/ipypbx/controllers.py" line="325"/>
         <source>Host Name</source>
         <translation>Имя хоста</translation>
     </message>
         <translation>Домены</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Username</source>
         <translation>Имя пользователя</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="263"/>
+        <location filename="src/ipypbx/controllers.py" line="361"/>
         <source>Password</source>
         <translation>Пароль</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Realm</source>
         <translation>Realm</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>From Domain</source>
         <translation>Домен в поле &quot;From&quot;</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Expire In Seconds</source>
         <translation>Время регистрации в секундах</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Retry In Seconds</source>
         <translation>Время повтора в секундах</translation>
     </message>
         <translation>Сетевой шлюз</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="263"/>
+        <location filename="src/ipypbx/controllers.py" line="361"/>
         <source>User ID</source>
         <translation>Идентификатор пользователя</translation>
     </message>
         <translation>Конечное оборудование</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>XML Dialplan</source>
         <translation>План нумерации XML</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Destination Match</source>
         <translation>Совпадение направления</translation>
     </message>
         <translation>Номера</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>ID</source>
         <translation>Идентификатор</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="179"/>
+        <location filename="src/ipypbx/controllers.py" line="197"/>
         <source>Local IP Address</source>
         <translation>Локальный IP-адрес</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Connection ID</source>
         <translation>Идентификатор соединения</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>SIP Profile ID</source>
         <translation>Идентификатор SIP-профиля</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="243"/>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
         <source>Caller ID In From Field</source>
         <translation>Идентификатор вызывающего абонента в поле &quot;От&quot;</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Domain ID</source>
         <translation>Идентификатор домена</translation>
     </message>
     <message>
-        <location filename="src/ipypbx/controllers.py" line="277"/>
+        <location filename="src/ipypbx/controllers.py" line="376"/>
         <source>Endpoint ID</source>
         <translation>Идентификатор конечного оборудования</translation>
     </message>
+    <message>
+        <location filename="src/ipypbx/controllers.py" line="339"/>
+        <source>Extension</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 </TS>
index 57a3194..f2c754b 100644 (file)
@@ -57,6 +57,7 @@ class Gateway(models.Model):
     password = models.CharField(max_length=100)
     realm = models.CharField(max_length=100)
     from_domain = models.CharField(max_length=100)
+    extension = models.CharField(max_length=100)
     expire_in_seconds = models.PositiveIntegerField()
     retry_in_seconds = models.PositiveIntegerField()
     caller_id_in_from_field = models.BooleanField()
index a6d25d5..9b7f7a4 100644 (file)
         <x>10</x>
         <y>10</y>
         <width>781</width>
-        <height>351</height>
+        <height>354</height>
        </rect>
       </property>
       <layout class="QGridLayout" name="gridLayout_8">
            </property>
           </widget>
          </item>
-         <item row="6" column="0">
+         <item row="7" column="0">
           <widget class="QLabel" name="label_23">
            <property name="text">
             <string>Expire In Seconds</string>
            </property>
           </widget>
          </item>
-         <item row="7" column="0">
+         <item row="8" column="0">
           <widget class="QLabel" name="label_24">
            <property name="text">
             <string>Retry In Seconds</string>
            </property>
           </widget>
          </item>
-         <item row="9" column="0">
+         <item row="10" column="0">
           <widget class="QLabel" name="label_25">
            <property name="text">
             <string/>
            </property>
           </widget>
          </item>
-         <item row="8" column="0">
+         <item row="9" column="0">
           <widget class="QCheckBox" name="gatewayIsActive">
            <property name="text">
             <string>Is Active</string>
            </property>
           </widget>
          </item>
-         <item row="8" column="1">
+         <item row="9" column="1">
           <widget class="QCheckBox" name="gatewayCallerIdInFromField">
            <property name="text">
             <string>Caller ID In &quot;From&quot; Field</string>
           <widget class="QLineEdit" name="gatewayFromDomain"/>
          </item>
          <item row="6" column="1">
-          <widget class="QLineEdit" name="gatewayExpireInSeconds"/>
+          <widget class="QLineEdit" name="lineEdit"/>
+         </item>
+         <item row="6" column="0">
+          <widget class="QLabel" name="label_31">
+           <property name="text">
+            <string>Extension</string>
+           </property>
+          </widget>
+         </item>
+         <item row="8" column="1">
+          <widget class="QLineEdit" name="gatewayRetryInSeconds">
+           <property name="text">
+            <string>3600</string>
+           </property>
+          </widget>
          </item>
          <item row="7" column="1">
-          <widget class="QLineEdit" name="gatewayRetryInSeconds"/>
+          <widget class="QLineEdit" name="gatewayExpireInSeconds">
+           <property name="text">
+            <string>3600</string>
+           </property>
+          </widget>
          </item>
         </layout>
        </item>