<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][16235] </title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=16235">16235</a></dd>
<dt>Author</dt> <dd>jmesquita</dd>
<dt>Date</dt> <dd>2010-01-10 22:40:39 -0600 (Sun, 10 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add all the new stuff to persist accounts and sofia configs. Still not working, but a lot work as been done and panes not working are disabled.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkfscommFSCommpro">freeswitch/trunk/fscomm/FSComm.pro</a></li>
<li><a href="#freeswitchtrunkfscommconfsofiaconfxml">freeswitch/trunk/fscomm/conf/sofia.conf.xml</a></li>
<li><a href="#freeswitchtrunkfscommfshostcpp">freeswitch/trunk/fscomm/fshost.cpp</a></li>
<li><a href="#freeswitchtrunkfscommfshosth">freeswitch/trunk/fscomm/fshost.h</a></li>
<li><a href="#freeswitchtrunkfscommmod_qsettingsmod_qsettingscpp">freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp</a></li>
<li><a href="#freeswitchtrunkfscommmod_qsettingsmod_qsettingsh">freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.h</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesaccountdialogcpp">freeswitch/trunk/fscomm/preferences/accountdialog.cpp</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesaccountdialogh">freeswitch/trunk/fscomm/preferences/accountdialog.h</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesaccountdialogui">freeswitch/trunk/fscomm/preferences/accountdialog.ui</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesprefdialogcpp">freeswitch/trunk/fscomm/preferences/prefdialog.cpp</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesprefdialogh">freeswitch/trunk/fscomm/preferences/prefdialog.h</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesprefdialogui">freeswitch/trunk/fscomm/preferences/prefdialog.ui</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#freeswitchtrunkfscommpreferencesprefaccountscpp">freeswitch/trunk/fscomm/preferences/prefaccounts.cpp</a></li>
<li><a href="#freeswitchtrunkfscommpreferencesprefaccountsh">freeswitch/trunk/fscomm/preferences/prefaccounts.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkfscommFSCommpro"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/FSComm.pro (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/FSComm.pro        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/FSComm.pro        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -29,7 +29,8 @@
</span><span class="cx">     preferences/prefdialog.cpp \
</span><span class="cx">     preferences/prefportaudio.cpp \
</span><span class="cx">     preferences/prefsofia.cpp \
</span><del>-    preferences/accountdialog.cpp
</del><ins>+    preferences/accountdialog.cpp \
+    preferences/prefaccounts.cpp
</ins><span class="cx"> HEADERS += mainwindow.h \
</span><span class="cx">     fshost.h \
</span><span class="cx">     call.h \
</span></span></pre></div>
<a id="freeswitchtrunkfscommconfsofiaconfxml"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/conf/sofia.conf.xml (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/conf/sofia.conf.xml        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/conf/sofia.conf.xml        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -9,6 +9,8 @@
</span><span class="cx">                         &lt;/global_settings&gt;
</span><span class="cx">                         &lt;profiles&gt;
</span><span class="cx">                                 &lt;profile name=&quot;softphone&quot;&gt;
</span><ins>+                                        &lt;gateways&gt;
+                                        &lt;/gateways&gt;
</ins><span class="cx">                                         &lt;settings&gt;
</span><span class="cx">                                          &lt;param name=&quot;user-agent-string&quot; value=&quot;${user-agent-string)&quot;/&gt;
</span><span class="cx">                                          &lt;param name=&quot;debug&quot; value=&quot;${debug}&quot;/&gt;
</span></span></pre></div>
<a id="freeswitchtrunkfscommfshostcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/fshost.cpp (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/fshost.cpp        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/fshost.cpp        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -47,15 +47,10 @@
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FSHost::run(void)
</del><ins>+void FSHost::createFolders()
</ins><span class="cx"> {
</span><del>-    switch_core_flag_t flags = SCF_USE_SQL | SCF_USE_AUTO_NAT;
-    const char *err = NULL;
-    switch_bool_t console = SWITCH_FALSE;
-    switch_status_t destroy_status;
-
</del><span class="cx">     /* Create directory structure for softphone with default configs */
</span><del>-    QDir conf_dir = QDir(QDir::home());
</del><ins>+    QDir conf_dir = QDir::home();
</ins><span class="cx">     if (!conf_dir.exists(&quot;.fscomm&quot;))
</span><span class="cx">     {
</span><span class="cx">         conf_dir.mkpath(&quot;.fscomm/conf/accounts&quot;);
</span><span class="lines">@@ -66,8 +61,8 @@
</span><span class="cx">         QString dest = QString(&quot;%1/.fscomm/conf/freeswitch.xml&quot;).arg(conf_dir.absolutePath());
</span><span class="cx">         rootXML.copy(dest);
</span><span class="cx"> 
</span><del>-        QFile defaultAccount(&quot;:/confs/example.xml&quot;);
-        dest = QString(&quot;%1/.fscomm/conf/accounts/example.xml&quot;).arg(conf_dir.absolutePath());
</del><ins>+        QFile defaultAccount(&quot;:/confs/template.xml&quot;);
+        dest = QString(&quot;%1/.fscomm/conf/accounts/template.xml&quot;).arg(conf_dir.absolutePath());
</ins><span class="cx">         defaultAccount.copy(dest);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -110,7 +105,17 @@
</span><span class="cx">         }
</span><span class="cx">         strcpy(SWITCH_GLOBAL_dirs.htdocs_dir, QString(&quot;%1/htdocs&quot;).arg(conf_dir.absolutePath()).toAscii().constData());
</span><span class="cx">     }
</span><ins>+}
</ins><span class="cx"> 
</span><ins>+void FSHost::run(void)
+{
+    switch_core_flag_t flags = SCF_USE_SQL | SCF_USE_AUTO_NAT;
+    const char *err = NULL;
+    switch_bool_t console = SWITCH_FALSE;
+    switch_status_t destroy_status;
+
+    createFolders();
+
</ins><span class="cx">     /* If you need to override configuration directories, you need to change them in the SWITCH_GLOBAL_dirs global structure */
</span><span class="cx">     printf(&quot;Initializing core...\n&quot;);
</span><span class="cx">     /* Initialize the core and load modules, that will startup FS completely */
</span></span></pre></div>
<a id="freeswitchtrunkfscommfshosth"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/fshost.h (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/fshost.h        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/fshost.h        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #define FSCOMM_GW_STATE_EXPIRED 7
</span><span class="cx"> #define FSCOMM_GW_STATE_NOREG 8
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> static const char *fscomm_gw_state_names[] = {
</span><span class="cx">     &quot;TRYING&quot;,
</span><span class="cx">     &quot;REGISTER&quot;,
</span><span class="lines">@@ -83,6 +84,7 @@
</span><span class="cx"> private:
</span><span class="cx">     switch_status_t processBlegEvent(switch_event_t *, QString);
</span><span class="cx">     switch_status_t processAlegEvent(switch_event_t *, QString);
</span><ins>+    void createFolders();
</ins><span class="cx">     void printEventHeaders(switch_event_t *event);
</span><span class="cx">     QHash&lt;QString, Call*&gt; _active_calls;
</span><span class="cx">     QHash&lt;QString, QString&gt; _bleg_uuids;
</span></span></pre></div>
<a id="freeswitchtrunkfscommmod_qsettingsmod_qsettingscpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.cpp        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -33,6 +33,8 @@
</span><span class="cx"> #include &lt;QString&gt;
</span><span class="cx"> #include &lt;QtGui&gt;
</span><span class="cx"> #include &lt;QDir&gt;
</span><ins>+#include &lt;QDomDocument&gt;
+#include &lt;QDomNodeList&gt;
</ins><span class="cx"> #include &quot;mod_qsettings/mod_qsettings.h&quot;
</span><span class="cx"> 
</span><span class="cx"> switch_xml_t XMLBinding::getConfigXML(QString tmpl)
</span><span class="lines">@@ -79,9 +81,82 @@
</span><span class="cx">     char *res = switch_event_expand_headers(e, tmplContents.data());
</span><span class="cx">     switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Template %s as follows:\n%s&quot;, tmpl.toAscii().constData(), res);
</span><span class="cx">     switch_safe_free(e);
</span><ins>+    if (tmpl == &quot;sofia.conf&quot;)
+    {
+        return proccessAccounts(tmpl, res);
+    }
</ins><span class="cx">     return switch_xml_parse_str(res, strlen(res));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+switch_xml_t XMLBinding::proccessAccounts(QString tmpl, QByteArray xml)
+{
+    char *res = NULL;
+
+    QDomDocument xmlDom;
+
+    /* Process sofia accounts */
+    if (tmpl == &quot;sofia.conf&quot;)
+    {
+        int errorLine, errorColumn;
+        QString errorMsg;
+
+        if (!xmlDom.setContent(xml, &amp;errorMsg, &amp;errorLine, &amp;errorColumn))
+        {
+            switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Could not parse the xml template from sofia.conf.xml to add the accounts!\n&quot;);
+        }
+        QDomNodeList gatewaysNodeList = xmlDom.elementsByTagName(&quot;gateways&quot;);
+        if (gatewaysNodeList.isEmpty() || gatewaysNodeList.count() &gt; 1)
+        {
+            switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Where is my gateways tag? Or do we have more then one match?\n&quot;);
+        }
+
+        QDomNode gatewaysNode = gatewaysNodeList.at(0);
+
+        _settings-&gt;beginGroup(&quot;FreeSWITCH/conf/accounts&quot;);
+        foreach (QString account, _settings-&gt;childGroups())
+        {
+            switch_event_t *e;
+            switch_event_create_plain(&amp;e, SWITCH_EVENT_REQUEST_PARAMS);
+            switch_assert(e);
+
+            _settings-&gt;beginGroup(account);
+            switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, &quot;name&quot;, account.toAscii().data());
+            foreach (QString k, _settings-&gt;childKeys())
+            {
+                switch_event_add_header_string(e, SWITCH_STACK_BOTTOM, k.toAscii().constData(), _settings-&gt;value(k).toByteArray().constData());
+            }
+            _settings-&gt;endGroup();
+
+            /* Open template file and expand all strings based on QSettings */
+            QFile tmplFile(QString(&quot;%1/.fscomm/templates/account.conf.xml&quot;).arg(QDir::homePath()));
+            if (!tmplFile.open(QIODevice::ReadOnly | QIODevice::Text))
+            {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Template for accounts could not be read!\n&quot;);
+                return NULL;
+            }
+
+            QByteArray tmplContents(tmplFile.readAll());
+            tmplFile.close();
+
+            res = switch_event_expand_headers(e, tmplContents.data());
+
+            switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Template of account %s as follows:\n%s&quot;, account.toAscii().data(), res);
+
+            QDomDocument gatewayXML;
+            if (!gatewayXML.setContent(QByteArray(res), &amp;errorMsg, &amp;errorLine, &amp;errorColumn))
+            {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;We could not parse the XML for the account!\n&quot;);
+            }
+
+            gatewaysNode.appendChild(gatewayXML);
+            switch_safe_free(e);
+        }
+        _settings-&gt;endGroup();
+    }
+
+    return switch_xml_parse_str(xmlDom.toByteArray().data(), strlen(xmlDom.toByteArray().data()));
+}
+
</ins><span class="cx"> static switch_xml_t xml_url_fetch(const char *section, const char *tag_name, const char *key_name, const char *key_value, switch_event_t *params,
</span><span class="cx">                                   void *user_data)
</span><span class="cx"> {
</span></span></pre></div>
<a id="freeswitchtrunkfscommmod_qsettingsmod_qsettingsh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.h (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.h        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/mod_qsettings/mod_qsettings.h        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx">     QString getBinding(void) { return _binding; }
</span><span class="cx">     switch_xml_t getConfigXML(QString);
</span><span class="cx"> private:
</span><ins>+    switch_xml_t proccessAccounts(QString, QByteArray);
</ins><span class="cx">     QString _binding;
</span><span class="cx">     QSettings* _settings;
</span><span class="cx"> };
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesaccountdialogcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/accountdialog.cpp (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/accountdialog.cpp        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.cpp        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><span class="cx"> #include &lt;QSettings&gt;
</span><ins>+#include &lt;QtGui&gt;
</ins><span class="cx"> #include &quot;accountdialog.h&quot;
</span><span class="cx"> #include &quot;ui_accountdialog.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -9,6 +10,8 @@
</span><span class="cx">     ui-&gt;setupUi(this);
</span><span class="cx">     _settings = new QSettings;
</span><span class="cx">     connect(this, SIGNAL(accepted()), this, SLOT(writeConfig()));
</span><ins>+    connect(ui-&gt;sofiaExtraParamAddBtn, SIGNAL(clicked()), this, SLOT(addExtraParam()));
+    connect(ui-&gt;sofiaExtraParamRemBtn, SIGNAL(clicked()), this, SLOT(remExtraParam()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> AccountDialog::~AccountDialog()
</span><span class="lines">@@ -16,6 +19,42 @@
</span><span class="cx">     delete ui;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void AccountDialog::remExtraParam()
+{
+    QList&lt;QTableWidgetSelectionRange&gt; sel = ui-&gt;sofiaExtraParamTable-&gt;selectedRanges();
+
+    foreach(QTableWidgetSelectionRange range, sel)
+    {
+        int offset =0;
+        for(int row = range.topRow(); row&lt;=range.bottomRow(); row++)
+        {
+            ui-&gt;sofiaExtraParamTable-&gt;removeRow(row-offset);
+            offset++;
+        }
+    }
+}
+
+void AccountDialog::addExtraParam()
+{
+    bool ok;
+    QString paramName = QInputDialog::getText(this, tr(&quot;Add parameter.&quot;),
+                                         tr(&quot;New parameter name:&quot;), QLineEdit::Normal,
+                                         NULL, &amp;ok);
+    if (!ok)
+        return;
+    QString paramVal = QInputDialog::getText(this, tr(&quot;Add parameter.&quot;),
+                                         tr(&quot;New parameter value:&quot;), QLineEdit::Normal,
+                                         NULL, &amp;ok);
+    if (!ok)
+        return;
+
+    QTableWidgetItem* paramNameItem = new QTableWidgetItem(paramName);
+    QTableWidgetItem* paramValItem = new QTableWidgetItem(paramVal);
+    ui-&gt;sofiaExtraParamTable-&gt;setRowCount(ui-&gt;sofiaExtraParamTable-&gt;rowCount()+1);
+    ui-&gt;sofiaExtraParamTable-&gt;setItem(ui-&gt;sofiaExtraParamTable-&gt;rowCount()-1,0,paramNameItem);
+    ui-&gt;sofiaExtraParamTable-&gt;setItem(ui-&gt;sofiaExtraParamTable-&gt;rowCount()-1,1,paramValItem);
+}
+
</ins><span class="cx"> void AccountDialog::writeConfig()
</span><span class="cx"> {
</span><span class="cx">     _settings-&gt;beginGroup(&quot;FreeSWITCH/conf/accounts&quot;);
</span><span class="lines">@@ -23,22 +62,24 @@
</span><span class="cx">     _settings-&gt;beginGroup(ui-&gt;sofiaGwNameEdit-&gt;text());
</span><span class="cx">     _settings-&gt;setValue(&quot;username&quot;, ui-&gt;sofiaGwUsernameEdit-&gt;text());
</span><span class="cx">     _settings-&gt;setValue(&quot;realm&quot;, ui-&gt;sofiaGwRealmEdit-&gt;text());
</span><del>-    _settings-&gt;setValue(&quot;from-user&quot;, ui-&gt;sofiaGwFromUserEdit-&gt;text());
-    _settings-&gt;setValue(&quot;from-domain&quot;, ui-&gt;sofiaGwFromDomainEdit-&gt;text());
</del><span class="cx">     _settings-&gt;setValue(&quot;password&quot;, ui-&gt;sofiaGwPasswordEdit-&gt;text());
</span><span class="cx">     _settings-&gt;setValue(&quot;extension&quot;, ui-&gt;sofiaGwExtensionEdit-&gt;text());
</span><del>-    _settings-&gt;setValue(&quot;proxy&quot;, ui-&gt;sofiaGwProxyEdit-&gt;text());
-    _settings-&gt;setValue(&quot;register-proxy&quot;, ui-&gt;sofiaGwRegisterProxyEdit-&gt;text());
</del><span class="cx">     _settings-&gt;setValue(&quot;expire-seconds&quot;, ui-&gt;sofiaGwExpireSecondsSpin-&gt;value());
</span><span class="cx">     _settings-&gt;setValue(&quot;register&quot;, ui-&gt;sofiaGwRegisterCombo-&gt;currentText());
</span><span class="cx">     _settings-&gt;setValue(&quot;register-transport&quot;, ui-&gt;sofiaGwRegisterTransportCombo-&gt;currentText());
</span><span class="cx">     _settings-&gt;setValue(&quot;retry-seconds&quot;, ui-&gt;sofiaGwRetrySecondsSpin-&gt;value());
</span><del>-    _settings-&gt;setValue(&quot;caller-id-in-from&quot;, ui-&gt;sofiaGwCallerIdInFromCombo-&gt;currentText());
-    _settings-&gt;setValue(&quot;contact-params&quot;, ui-&gt;sofiaGwContactParamsEdit-&gt;text());
-    _settings-&gt;setValue(&quot;ping&quot;, ui-&gt;sofiaGwPingSpin-&gt;value());
</del><ins>+
+    _settings-&gt;beginGroup(&quot;customParams&quot;);
+    for (int i = 0; i&lt; ui-&gt;sofiaExtraParamTable-&gt;rowCount(); i++)
+    {
+        _settings-&gt;setValue(ui-&gt;sofiaExtraParamTable-&gt;item(i, 0)-&gt;text(),
+                            ui-&gt;sofiaExtraParamTable-&gt;item(i, 1)-&gt;text());
+    }
</ins><span class="cx">     _settings-&gt;endGroup();
</span><span class="cx"> 
</span><span class="cx">     _settings-&gt;endGroup();
</span><ins>+
+    _settings-&gt;endGroup();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void AccountDialog::changeEvent(QEvent *e)
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesaccountdialogh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/accountdialog.h (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/accountdialog.h        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.h        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -17,6 +17,8 @@
</span><span class="cx"> 
</span><span class="cx"> private slots:
</span><span class="cx">     void writeConfig();
</span><ins>+    void addExtraParam();
+    void remExtraParam();
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     void changeEvent(QEvent *e);
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesaccountdialogui"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/accountdialog.ui (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/accountdialog.ui        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/preferences/accountdialog.ui        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -9,206 +9,204 @@
</span><span class="cx">    &lt;rect&gt;
</span><span class="cx">     &lt;x&gt;0&lt;/x&gt;
</span><span class="cx">     &lt;y&gt;0&lt;/y&gt;
</span><del>-    &lt;width&gt;495&lt;/width&gt;
-    &lt;height&gt;573&lt;/height&gt;
</del><ins>+    &lt;width&gt;389&lt;/width&gt;
+    &lt;height&gt;394&lt;/height&gt;
</ins><span class="cx">    &lt;/rect&gt;
</span><span class="cx">   &lt;/property&gt;
</span><span class="cx">   &lt;property name=&quot;windowTitle&quot;&gt;
</span><span class="cx">    &lt;string&gt;Account&lt;/string&gt;
</span><span class="cx">   &lt;/property&gt;
</span><del>-  &lt;layout class=&quot;QFormLayout&quot; name=&quot;formLayout&quot;&gt;
-   &lt;item row=&quot;0&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;name&lt;/string&gt;
</del><ins>+  &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout&quot;&gt;
+   &lt;item&gt;
+    &lt;widget class=&quot;QTabWidget&quot; name=&quot;tabWidget&quot;&gt;
+     &lt;property name=&quot;currentIndex&quot;&gt;
+      &lt;number&gt;1&lt;/number&gt;
</ins><span class="cx">      &lt;/property&gt;
</span><ins>+     &lt;widget class=&quot;QWidget&quot; name=&quot;tab&quot;&gt;
+      &lt;attribute name=&quot;title&quot;&gt;
+       &lt;string&gt;Basic&lt;/string&gt;
+      &lt;/attribute&gt;
+      &lt;layout class=&quot;QFormLayout&quot; name=&quot;formLayout&quot;&gt;
+       &lt;property name=&quot;fieldGrowthPolicy&quot;&gt;
+        &lt;enum&gt;QFormLayout::AllNonFixedFieldsGrow&lt;/enum&gt;
+       &lt;/property&gt;
+       &lt;item row=&quot;0&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;name&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;0&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwNameEdit&quot;/&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;1&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_2&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;username&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;1&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwUsernameEdit&quot;/&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;2&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_3&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;realm&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;2&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwRealmEdit&quot;/&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;3&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_6&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;password&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;3&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwPasswordEdit&quot;/&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;4&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_7&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;extension&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;4&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwExtensionEdit&quot;/&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;5&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_10&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;expire-seconds&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;5&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QSpinBox&quot; name=&quot;sofiaGwExpireSecondsSpin&quot;&gt;
+         &lt;property name=&quot;value&quot;&gt;
+          &lt;number&gt;60&lt;/number&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;6&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_11&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;register&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;6&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QComboBox&quot; name=&quot;sofiaGwRegisterCombo&quot;&gt;
+         &lt;item&gt;
+          &lt;property name=&quot;text&quot;&gt;
+           &lt;string&gt;true&lt;/string&gt;
+          &lt;/property&gt;
+         &lt;/item&gt;
+         &lt;item&gt;
+          &lt;property name=&quot;text&quot;&gt;
+           &lt;string&gt;false&lt;/string&gt;
+          &lt;/property&gt;
+         &lt;/item&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;7&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_12&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;register-transport&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;7&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QComboBox&quot; name=&quot;sofiaGwRegisterTransportCombo&quot;&gt;
+         &lt;item&gt;
+          &lt;property name=&quot;text&quot;&gt;
+           &lt;string&gt;udp&lt;/string&gt;
+          &lt;/property&gt;
+         &lt;/item&gt;
+         &lt;item&gt;
+          &lt;property name=&quot;text&quot;&gt;
+           &lt;string&gt;tcp&lt;/string&gt;
+          &lt;/property&gt;
+         &lt;/item&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;8&quot; column=&quot;0&quot;&gt;
+        &lt;widget class=&quot;QLabel&quot; name=&quot;label_13&quot;&gt;
+         &lt;property name=&quot;text&quot;&gt;
+          &lt;string&gt;retry-seconds&lt;/string&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item row=&quot;8&quot; column=&quot;1&quot;&gt;
+        &lt;widget class=&quot;QSpinBox&quot; name=&quot;sofiaGwRetrySecondsSpin&quot;&gt;
+         &lt;property name=&quot;value&quot;&gt;
+          &lt;number&gt;30&lt;/number&gt;
+         &lt;/property&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+      &lt;/layout&gt;
+     &lt;/widget&gt;
+     &lt;widget class=&quot;QWidget&quot; name=&quot;tab_2&quot;&gt;
+      &lt;attribute name=&quot;title&quot;&gt;
+       &lt;string&gt;Advanced&lt;/string&gt;
+      &lt;/attribute&gt;
+      &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout&quot;&gt;
+       &lt;item&gt;
+        &lt;widget class=&quot;QTableWidget&quot; name=&quot;sofiaExtraParamTable&quot;&gt;
+         &lt;column&gt;
+          &lt;property name=&quot;text&quot;&gt;
+           &lt;string&gt;Param Name&lt;/string&gt;
+          &lt;/property&gt;
+         &lt;/column&gt;
+         &lt;column&gt;
+          &lt;property name=&quot;text&quot;&gt;
+           &lt;string&gt;Param Value&lt;/string&gt;
+          &lt;/property&gt;
+         &lt;/column&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item&gt;
+        &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout_2&quot;&gt;
+         &lt;item&gt;
+          &lt;widget class=&quot;QPushButton&quot; name=&quot;sofiaExtraParamAddBtn&quot;&gt;
+           &lt;property name=&quot;text&quot;&gt;
+            &lt;string&gt;+&lt;/string&gt;
+           &lt;/property&gt;
+          &lt;/widget&gt;
+         &lt;/item&gt;
+         &lt;item&gt;
+          &lt;widget class=&quot;QPushButton&quot; name=&quot;sofiaExtraParamRemBtn&quot;&gt;
+           &lt;property name=&quot;text&quot;&gt;
+            &lt;string&gt;-&lt;/string&gt;
+           &lt;/property&gt;
+          &lt;/widget&gt;
+         &lt;/item&gt;
+         &lt;item&gt;
+          &lt;spacer name=&quot;verticalSpacer&quot;&gt;
+           &lt;property name=&quot;orientation&quot;&gt;
+            &lt;enum&gt;Qt::Vertical&lt;/enum&gt;
+           &lt;/property&gt;
+           &lt;property name=&quot;sizeHint&quot; stdset=&quot;0&quot;&gt;
+            &lt;size&gt;
+             &lt;width&gt;20&lt;/width&gt;
+             &lt;height&gt;40&lt;/height&gt;
+            &lt;/size&gt;
+           &lt;/property&gt;
+          &lt;/spacer&gt;
+         &lt;/item&gt;
+        &lt;/layout&gt;
+       &lt;/item&gt;
+      &lt;/layout&gt;
+     &lt;/widget&gt;
</ins><span class="cx">     &lt;/widget&gt;
</span><span class="cx">    &lt;/item&gt;
</span><del>-   &lt;item row=&quot;0&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwNameEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;1&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_2&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;username&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;1&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwUsernameEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;2&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_3&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;realm&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;2&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwRealmEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;3&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_4&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;from-user&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;3&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwFromUserEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;4&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_5&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;from-domain&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;4&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwFromDomainEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;5&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_6&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;password&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;5&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwPasswordEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;6&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_7&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;extension&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;6&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwExtensionEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;7&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_8&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;proxy&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;7&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwProxyEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;8&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_9&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;register-proxy&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;8&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwRegisterProxyEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;9&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_10&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;expire-seconds&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;9&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QSpinBox&quot; name=&quot;sofiaGwExpireSecondsSpin&quot;&gt;
-     &lt;property name=&quot;value&quot;&gt;
-      &lt;number&gt;60&lt;/number&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;10&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_11&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;register&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;10&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QComboBox&quot; name=&quot;sofiaGwRegisterCombo&quot;&gt;
-     &lt;item&gt;
-      &lt;property name=&quot;text&quot;&gt;
-       &lt;string&gt;true&lt;/string&gt;
-      &lt;/property&gt;
-     &lt;/item&gt;
-     &lt;item&gt;
-      &lt;property name=&quot;text&quot;&gt;
-       &lt;string&gt;false&lt;/string&gt;
-      &lt;/property&gt;
-     &lt;/item&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;11&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_12&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;register-transport&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;11&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QComboBox&quot; name=&quot;sofiaGwRegisterTransportCombo&quot;&gt;
-     &lt;item&gt;
-      &lt;property name=&quot;text&quot;&gt;
-       &lt;string&gt;udp&lt;/string&gt;
-      &lt;/property&gt;
-     &lt;/item&gt;
-     &lt;item&gt;
-      &lt;property name=&quot;text&quot;&gt;
-       &lt;string&gt;tcp&lt;/string&gt;
-      &lt;/property&gt;
-     &lt;/item&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;12&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_13&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;retry-seconds&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;12&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QSpinBox&quot; name=&quot;sofiaGwRetrySecondsSpin&quot;&gt;
-     &lt;property name=&quot;value&quot;&gt;
-      &lt;number&gt;30&lt;/number&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;13&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_15&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;contact-params&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;13&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QLineEdit&quot; name=&quot;sofiaGwContactParamsEdit&quot;/&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;14&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_14&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;caller-id-in-from&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;15&quot; column=&quot;0&quot;&gt;
-    &lt;widget class=&quot;QLabel&quot; name=&quot;label_16&quot;&gt;
-     &lt;property name=&quot;text&quot;&gt;
-      &lt;string&gt;ping&lt;/string&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;15&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QSpinBox&quot; name=&quot;sofiaGwPingSpin&quot;&gt;
-     &lt;property name=&quot;value&quot;&gt;
-      &lt;number&gt;25&lt;/number&gt;
-     &lt;/property&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
-   &lt;item row=&quot;16&quot; column=&quot;1&quot;&gt;
</del><ins>+   &lt;item&gt;
</ins><span class="cx">     &lt;widget class=&quot;QDialogButtonBox&quot; name=&quot;buttonBox&quot;&gt;
</span><span class="cx">      &lt;property name=&quot;orientation&quot;&gt;
</span><span class="cx">       &lt;enum&gt;Qt::Horizontal&lt;/enum&gt;
</span><span class="lines">@@ -218,20 +216,6 @@
</span><span class="cx">      &lt;/property&gt;
</span><span class="cx">     &lt;/widget&gt;
</span><span class="cx">    &lt;/item&gt;
</span><del>-   &lt;item row=&quot;14&quot; column=&quot;1&quot;&gt;
-    &lt;widget class=&quot;QComboBox&quot; name=&quot;sofiaGwCallerIdInFromCombo&quot;&gt;
-     &lt;item&gt;
-      &lt;property name=&quot;text&quot;&gt;
-       &lt;string&gt;false&lt;/string&gt;
-      &lt;/property&gt;
-     &lt;/item&gt;
-     &lt;item&gt;
-      &lt;property name=&quot;text&quot;&gt;
-       &lt;string&gt;true&lt;/string&gt;
-      &lt;/property&gt;
-     &lt;/item&gt;
-    &lt;/widget&gt;
-   &lt;/item&gt;
</del><span class="cx">   &lt;/layout&gt;
</span><span class="cx">  &lt;/widget&gt;
</span><span class="cx">  &lt;resources/&gt;
</span><span class="lines">@@ -243,8 +227,8 @@
</span><span class="cx">    &lt;slot&gt;accept()&lt;/slot&gt;
</span><span class="cx">    &lt;hints&gt;
</span><span class="cx">     &lt;hint type=&quot;sourcelabel&quot;&gt;
</span><del>-     &lt;x&gt;248&lt;/x&gt;
-     &lt;y&gt;254&lt;/y&gt;
</del><ins>+     &lt;x&gt;257&lt;/x&gt;
+     &lt;y&gt;563&lt;/y&gt;
</ins><span class="cx">     &lt;/hint&gt;
</span><span class="cx">     &lt;hint type=&quot;destinationlabel&quot;&gt;
</span><span class="cx">      &lt;x&gt;157&lt;/x&gt;
</span><span class="lines">@@ -259,8 +243,8 @@
</span><span class="cx">    &lt;slot&gt;reject()&lt;/slot&gt;
</span><span class="cx">    &lt;hints&gt;
</span><span class="cx">     &lt;hint type=&quot;sourcelabel&quot;&gt;
</span><del>-     &lt;x&gt;316&lt;/x&gt;
-     &lt;y&gt;260&lt;/y&gt;
</del><ins>+     &lt;x&gt;325&lt;/x&gt;
+     &lt;y&gt;563&lt;/y&gt;
</ins><span class="cx">     &lt;/hint&gt;
</span><span class="cx">     &lt;hint type=&quot;destinationlabel&quot;&gt;
</span><span class="cx">      &lt;x&gt;286&lt;/x&gt;
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesprefaccountscpp"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/fscomm/preferences/prefaccounts.cpp (0 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/prefaccounts.cpp                                (rev 0)
+++ freeswitch/trunk/fscomm/preferences/prefaccounts.cpp        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+#include &lt;QtGui&gt;
+#include &quot;prefaccounts.h&quot;
+
+PrefAccounts::PrefAccounts(Ui::PrefDialog *ui) :
+        _ui(ui)
+{
+    _settings = new QSettings();
+}
+
+void PrefAccounts::writeConfig()
+{
+    return;
+}
+
+void PrefAccounts::readConfig()
+{
+    _settings-&gt;beginGroup(&quot;FreeSWITCH/conf/accounts&quot;);
+    foreach(QString accountName, _settings-&gt;childGroups())
+    {
+        _settings-&gt;beginGroup(accountName);
+        QTableWidgetItem *item0 = new QTableWidgetItem(accountName);
+        QTableWidgetItem *item1 = new QTableWidgetItem(_settings-&gt;value(&quot;username&quot;).toString());
+        _settings-&gt;endGroup();
+        _ui-&gt;accountsTable-&gt;setRowCount(_ui-&gt;accountsTable-&gt;rowCount()+1);
+        _ui-&gt;accountsTable-&gt;setItem(_ui-&gt;accountsTable-&gt;rowCount()-1, 0, item0);
+        _ui-&gt;accountsTable-&gt;setItem(_ui-&gt;accountsTable-&gt;rowCount()-1, 1, item1);
+    }
+
+    _settings-&gt;endGroup();
+}
</ins></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesprefaccountsh"></a>
<div class="addfile"><h4>Added: freeswitch/trunk/fscomm/preferences/prefaccounts.h (0 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/prefaccounts.h                                (rev 0)
+++ freeswitch/trunk/fscomm/preferences/prefaccounts.h        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+#ifndef PREFACCOUNTS_H
+#define PREFACCOUNTS_H
+
+#include &lt;QObject&gt;
+#include &quot;ui_prefdialog.h&quot;
+
+class QSettings;
+
+class PrefAccounts
+{
+public:
+    explicit PrefAccounts(Ui::PrefDialog *ui);
+    void readConfig();
+    void writeConfig();
+
+private:
+    Ui::PrefDialog *_ui;
+    QSettings *_settings;
+};
+
+#endif // PREFACCOUNTS_H
</ins></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesprefdialogcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/prefdialog.cpp (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/prefdialog.cpp        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/preferences/prefdialog.cpp        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -4,6 +4,7 @@
</span><span class="cx"> #include &quot;prefportaudio.h&quot;
</span><span class="cx"> #include &quot;prefsofia.h&quot;
</span><span class="cx"> #include &quot;accountdialog.h&quot;
</span><ins>+#include &quot;prefaccounts.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> PrefDialog::PrefDialog(QWidget *parent) :
</span><span class="cx">     QDialog(parent),
</span><span class="lines">@@ -15,8 +16,9 @@
</span><span class="cx">     connect(ui-&gt;sofiaGwAddBtn, SIGNAL(clicked()), this, SLOT(addAccountBtnClicked()));
</span><span class="cx"> 
</span><span class="cx">     _accDlg = NULL;
</span><ins>+    /*_pref_accounts = new PrefAccounts(ui);*/
</ins><span class="cx">     _mod_portaudio = new PrefPortaudio(ui, this);
</span><del>-    _mod_sofia = new PrefSofia(ui, this);
</del><ins>+    /*_mod_sofia = new PrefSofia(ui, this);*/
</ins><span class="cx">     readConfig();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -55,6 +57,7 @@
</span><span class="cx"> 
</span><span class="cx"> void PrefDialog::readConfig()
</span><span class="cx"> {
</span><ins>+    /*_pref_accounts-&gt;readConfig();*/
</ins><span class="cx">     _mod_portaudio-&gt;readConfig();
</span><span class="cx">     /*_mod_sofia-&gt;readConfig();*/
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesprefdialogh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/prefdialog.h (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/prefdialog.h        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/preferences/prefdialog.h        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -8,6 +8,7 @@
</span><span class="cx"> 
</span><span class="cx"> class PrefPortaudio;
</span><span class="cx"> class PrefSofia;
</span><ins>+class PrefAccounts;
</ins><span class="cx"> class AccountDialog;
</span><span class="cx"> 
</span><span class="cx"> namespace Ui {
</span><span class="lines">@@ -31,9 +32,10 @@
</span><span class="cx">     void readConfig();
</span><span class="cx">     QSettings *_settings;
</span><span class="cx">     AccountDialog *_accDlg;
</span><ins>+/*    PrefAccounts *_pref_accounts;*/
</ins><span class="cx">     Ui::PrefDialog *ui;
</span><span class="cx">     PrefPortaudio *_mod_portaudio;
</span><del>-    PrefSofia *_mod_sofia;
</del><ins>+/*    PrefSofia *_mod_sofia;*/
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchtrunkfscommpreferencesprefdialogui"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/fscomm/preferences/prefdialog.ui (16234 => 16235)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/fscomm/preferences/prefdialog.ui        2010-01-11 03:47:19 UTC (rev 16234)
+++ freeswitch/trunk/fscomm/preferences/prefdialog.ui        2010-01-11 04:40:39 UTC (rev 16235)
</span><span class="lines">@@ -72,6 +72,9 @@
</span><span class="cx">        &lt;iconset resource=&quot;../resources.qrc&quot;&gt;
</span><span class="cx">         &lt;normaloff&gt;:/images/pref_accounts.jpg&lt;/normaloff&gt;:/images/pref_accounts.jpg&lt;/iconset&gt;
</span><span class="cx">       &lt;/property&gt;
</span><ins>+      &lt;property name=&quot;flags&quot;&gt;
+       &lt;set&gt;ItemIsSelectable|ItemIsDragEnabled|ItemIsUserCheckable&lt;/set&gt;
+      &lt;/property&gt;
</ins><span class="cx">      &lt;/item&gt;
</span><span class="cx">      &lt;item&gt;
</span><span class="cx">       &lt;property name=&quot;text&quot;&gt;
</span><span class="lines">@@ -81,6 +84,9 @@
</span><span class="cx">        &lt;iconset resource=&quot;../resources.qrc&quot;&gt;
</span><span class="cx">         &lt;normaloff&gt;:/images/pref_sip.png&lt;/normaloff&gt;:/images/pref_sip.png&lt;/iconset&gt;
</span><span class="cx">       &lt;/property&gt;
</span><ins>+      &lt;property name=&quot;flags&quot;&gt;
+       &lt;set&gt;ItemIsSelectable|ItemIsDragEnabled|ItemIsUserCheckable&lt;/set&gt;
+      &lt;/property&gt;
</ins><span class="cx">      &lt;/item&gt;
</span><span class="cx">      &lt;item&gt;
</span><span class="cx">       &lt;property name=&quot;text&quot;&gt;
</span><span class="lines">@@ -134,17 +140,12 @@
</span><span class="cx">      &lt;widget class=&quot;QWidget&quot; name=&quot;accountsPage&quot;&gt;
</span><span class="cx">       &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_5&quot;&gt;
</span><span class="cx">        &lt;item&gt;
</span><del>-        &lt;widget class=&quot;QTableWidget&quot; name=&quot;sofiaGwListWidget&quot;&gt;
</del><ins>+        &lt;widget class=&quot;QTableWidget&quot; name=&quot;accountsTable&quot;&gt;
</ins><span class="cx">          &lt;property name=&quot;editTriggers&quot;&gt;
</span><span class="cx">           &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
</span><span class="cx">          &lt;/property&gt;
</span><span class="cx">          &lt;column&gt;
</span><span class="cx">           &lt;property name=&quot;text&quot;&gt;
</span><del>-           &lt;string&gt;Enabled&lt;/string&gt;
-          &lt;/property&gt;
-         &lt;/column&gt;
-         &lt;column&gt;
-          &lt;property name=&quot;text&quot;&gt;
</del><span class="cx">            &lt;string&gt;Name&lt;/string&gt;
</span><span class="cx">           &lt;/property&gt;
</span><span class="cx">          &lt;/column&gt;
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>