Ok, we persist sofia configs. Code is there but not effective since we break accounts.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16195 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
João Mesquita 2010-01-07 06:43:51 +00:00
parent 478f165d25
commit 4f2a021213
7 changed files with 82 additions and 120 deletions

View File

@ -10,117 +10,33 @@
<profiles>
<profile name="softphone">
<settings>
<param name="debug" value="${debug}" />
<param name="shutdown-on-fail" value="${shutdown-on-fail}" />
<param name="sip-trace" value="${sip-trace}" />
<param name="odbc-dsn" value="${odbc-dsn}" />
<param name="user-agent-string" value="${user-agent-string}" />
<param name="auto-restart" value="${auto-restart}" />
<param name="log-auth-failures" value="${log-auth-failures}" />
<param name="dtmf-type" value="${dtmf-type}" />
<param name="NDLB-force-rport" value="${NDLB-force-rport}" />
<param name="auto-rtp-bugs" value="${auto-rtp-bugs}" />
<param name="dbname" value="${dbname}" />
<param name="presence-hosts" value="${presence-hosts}" />
<param name="caller-id-type" value="${caller-id-type}" />
<param name="record-template" value="${record-template}" />
<param name="record-path" value="${record-path}" />
<param name="inbound-bypass-media" value="${inbound-bypass-media}" />
<param name="inbound-late-negotiation" value="${inbound-late-negotiation}" />
<param name="rtp-autoflush-during-bridge" value="${rtp-autoflush-during-bridge}" />
<param name="manual-redirect" value="${manual-redirect}" />
<param name="inbound-proxy-media" value="${inbound-proxy-media}" />
<param name="force-subscription-expires" value="${force-subscription-expires}" />
<param name="send-message-query-on-register" value="${send-message-query-on-register}" />
<param name="inbound-use-callid-as-uuid" value="${inbound-use-callid-as-uuid}" />
<param name="outbound-use-uuid-as-callid" value="${outbound-use-uuid-as-callid}" />
<param name="NDLB-received-in-nat-reg-contact" value="${NDLB-received-in-nat-reg-contact}" />
<param name="aggressive-nat-detection" value="${aggressive-nat-detection}" />
<param name="disable-rtp-auto-adjust" value="${disable-rtp-auto-adjust}" />
<param name="NDLB-support-asterisk-missing-srtp-auth" value="${NDLB-support-asterisk-missing-srtp-auth}" />
<param name="NDLB-funny-stun" value="${NDLB-funny-stun}" />
<param name="stun-enabled" value="${stun-enabled}" />
<param name="stun-auto-disable" value="${stun-auto-disable}" />
<param name="rfc2833-pt" value="${rfc2833-pt}" />
<param name="cng-pt" value="${cng-pt}" />
<param name="sip-port" value="${sip-port}" />
<param name="vad" value="${vad}" />
<param name="ext-rtp-ip" value="${ext-rtp-ip}" />
<param name="rtp-ip" value="${rtp-ip}" />
<param name="ext-sip-ip" value="${ext-sip-ip}" />
<param name="local-network-acl" value="${local-network-acl}" />
<param name="force-register-domain" value="${force-register-domain}" />
<param name="force-register-db-domain" value="${force-register-db-domain}" />
<param name="bind-params" value="${bind-params}" />
<param name="sip-domain" value="${sip-domain}" />
<param name="rtp-timer-name" value="${rtp-timer-name}" />
<param name="hold-music" value="${hold-music}" />
<param name="outbound-proxy" value="${outbound-proxy}" />
<param name="session-timeout" value="${session-timeout}" />
<param name="max-proceeding" value="${max-proceeding}" />
<param name="rtp-timeout-sec" value="${rtp-timeout-sec}" />
<param name="rtp-hold-timeout-sec" value="${rtp-hold-timeout-sec}" />
<param name="disable-transfer" value="${disable-transfer}" />
<param name="disable-register" value="${disable-register}" />
<param name="media-option" value="${media-option}" />
<param name="manage-presence" value="${manage-presence}" />
<param name="manage-shared-appearance" value="${manage-shared-appearance}" />
<param name="disable-srv" value="${disable-srv}" />
<param name="disable-naptr" value="${disable-naptr}" />
<param name="unregister-on-options-fail" value="${unregister-on-options-fail}" />
<param name="require-secure-rtp" value="${require-secure-rtp}" />
<param name="multiple-registrations" value="${multiple-registrations}" />
<param name="suppress-cng" value="${suppress-cng}" />
<param name="NDLB-broken-auth-hash" value="${NDLB-broken-auth-hash}" />
<param name="NDLB-sendrecv-in-session" value="${NDLB-sendrecv-in-session}" />
<param name="NDLB-allow-bad-iananame" value="${NDLB-allow-bad-iananame}" />
<param name="pass-rfc2833" value="${pass-rfc2833}" />
<param name="rtp-autoflush" value="${rtp-autoflush}" />
<param name="rtp-autofix-timing" value="${rtp-autofix-timing}" />
<param name="contact-user" value="${contact-user}" />
<param name="nat-options-ping" value="${nat-options-ping}" />
<param name="inbound-codec-negotiation" value="${inbound-codec-negotiation}" />
<param name="disable-transcoding" value="${disable-transcoding}" />
<param name="rtp-rewrite-timestamps" value="${rtp-rewrite-timestamps}" />
<param name="auth-calls" value="${auth-calls}" />
<param name="nonce-ttl" value="${nonce-ttl}" />
<param name="accept-blind-reg" value="${accept-blind-reg}" />
<param name="enable-3pcc" value="${enable-3pcc}" />
<param name="accept-blind-auth" value="${accept-blind-auth}" />
<param name="auth-all-packets" value="${auth-all-packets}" />
<param name="full-id-in-dialplan" value="${full-id-in-dialplan}" />
<param name="inbound-reg-force-matching-username" value="${inbound-reg-force-matching-username}" />
<param name="enable-timer" value="${enable-timer}" />
<param name="minimum-session-expires" value="${minimum-session-expires}" />
<param name="enable-100rel" value="${enable-100rel}" />
<param name="enable-compact-headers" value="${enable-compact-headers}" />
<param name="pass-callee-id" value="${pass-callee-id}" />
<param name="sql-in-transactions" value="${sql-in-transactions}" />
<param name="enable-soa" value="${enable-soa}" />
<param name="bitpacking" value="${bitpacking}" />
<param name="username" value="${username}" />
<param name="context" value="${context}" />
<param name="apply-nat-acl" value="${apply-nat-acl}" />
<param name="apply-inbound-acl" value="${apply-inbound-acl}" />
<param name="apply-proxy-acl" value="${apply-proxy-acl}" />
<param name="apply-register-acl" value="${apply-register-acl}" />
<param name="alias" value="${alias}" />
<param name="dialplan" value="${dialplan}" />
<param name="max-calls" value="${max-calls}" />
<param name="codec-prefs" value="${codec-prefs}" />
<param name="inbound-codec-prefs" value="${inbound-codec-prefs}" />
<param name="outbound-codec-prefs" value="${outbound-codec-prefs}" />
<param name="challenge-realm" value="${challenge-realm}" />
<param name="dtmf-duration" value="${dtmf-duration}" />
<param name="tls" value="${tls}" />
<param name="tls-bind-params" value="${tls-bind-params}" />
<param name="tls-sip-port" value="${tls-sip-port}" />
<param name="tls-cert-dir" value="${tls-cert-dir}" />
<param name="tls-version" value="${tls-version}" />
<param name="timer-T1" value="${timer-T1}" />
<param name="timer-T1X64" value="${timer-T1X64}" />
<param name="timer-T2" value="${timer-T2}" />
<param name="timer-T4" value="${timer-T4}" />
<param name="user-agent-string" value="${user-agent-string)"/>
<param name="debug" value="${debug}"/>
<param name="sip-trace" value="${sip-trace}"/>
<param name="context" value="${context}"/>
<param name="rfc2833-pt" value="${rfc2833-pt}"/>
<param name="sip-port" value="${sip-port}"/>
<param name="dialplan" value="${dialplan}"/>
<param name="dtmf-duration" value="${dtmf-duration}"/>
<param name="codec-prefs" value="${codec_prefs}"/>
<param name="use-rtp-timer" value="${use-rtp-timer}"/>
<param name="rtp-timer-name" value="${rtp-timer-name}"/>
<param name="rtp-ip" value="${rtp-ip}"/>
<param name="sip-ip" value="${sip-ip}"/>
<param name="hold-music" value="${hold-music}"/>
<param name="apply-nat-acl" value="${apply-nat-acl}"/>
<param name="manage-presence" value="${manage-presence}"/>
<param name="max-proceeding" value="${max-proceeding}"/>
<param name="inbound-codec-negotiation" value="${inbound-codec-negotiation}"/>
<param name="nonce-ttl" value="${nonce-ttl}"/>
<param name="auth-calls" value="${auth-calls}"/>
<param name="auth-all-packets" value="${auth-all-packets}"/>
<param name="ext-rtp-ip" value="${ext-rtp-ip}"/>
<param name="ext-sip-ip" value="${ext-sip-ip}"/>
<param name="rtp-timeout-sec" value="${rtp-timeout-sec}"/>
<param name="rtp-hold-timeout-sec" value="${rtp-hold-timeout-sec}"/>
<param name="disable-register" value="${disable-register}"/>
<param name="challenge-realm" value="${challenge-realm}"/>
</settings>
</profile>
</profiles>

View File

@ -37,7 +37,7 @@
#include <switch.h>
#include <fshost.h>
#include <call.h>
#include <prefdialog.h>
#include "preferences/prefdialog.h"
namespace Ui {
class MainWindow;

View File

@ -2,6 +2,7 @@
#include "prefdialog.h"
#include "ui_prefdialog.h"
#include "prefportaudio.h"
#include "prefsofia.h"
PrefDialog::PrefDialog(QWidget *parent) :
QDialog(parent),
@ -12,6 +13,7 @@ PrefDialog::PrefDialog(QWidget *parent) :
connect(this, SIGNAL(accepted()), this, SLOT(writeConfig()));
_mod_portaudio = new PrefPortaudio(ui, this);
_mod_sofia = new PrefSofia(ui, this);
readConfig();
}
@ -23,6 +25,7 @@ PrefDialog::~PrefDialog()
void PrefDialog::writeConfig()
{
_mod_portaudio->writeConfig();
/*_mod_sofia->writeConfig();*/
}
void PrefDialog::changeEvent(QEvent *e)
@ -40,4 +43,5 @@ void PrefDialog::changeEvent(QEvent *e)
void PrefDialog::readConfig()
{
_mod_portaudio->readConfig();
/*_mod_sofia->readConfig();*/
}

View File

@ -7,6 +7,7 @@
#include <fshost.h>
class PrefPortaudio;
class PrefSofia;
namespace Ui {
class PrefDialog;
@ -29,6 +30,7 @@ private:
QSettings *_settings;
Ui::PrefDialog *ui;
PrefPortaudio *_mod_portaudio;
PrefSofia *_mod_sofia;
};

View File

@ -60,7 +60,7 @@
<string>General</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<iconset resource="../resources.qrc">
<normaloff>:/images/pref_general.jpg</normaloff>:/images/pref_general.jpg</iconset>
</property>
</item>
@ -69,7 +69,7 @@
<string>Sofia</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<iconset resource="../resources.qrc">
<normaloff>:/images/pref_sip.png</normaloff>:/images/pref_sip.png</iconset>
</property>
</item>
@ -78,7 +78,7 @@
<string>PortAudio</string>
</property>
<property name="icon">
<iconset resource="resources.qrc">
<iconset resource="../resources.qrc">
<normaloff>:/images/pref_audio.gif</normaloff>:/images/pref_audio.gif</iconset>
</property>
</item>
@ -270,7 +270,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit">
<widget class="QLineEdit" name="sofiaDialplanEdit">
<property name="text">
<string>XML</string>
</property>
@ -346,7 +346,7 @@
<item row="2" column="1">
<widget class="QLineEdit" name="sofiaRtpIpEdit">
<property name="text">
<string>$${local_ip_v4}</string>
<string>auto</string>
</property>
</widget>
</item>
@ -360,7 +360,7 @@
<item row="3" column="1">
<widget class="QLineEdit" name="sofiaSipIpEdit">
<property name="text">
<string>$${local_ip_v4}</string>
<string>auto</string>
</property>
</widget>
</item>
@ -517,7 +517,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="spinBox">
<widget class="QSpinBox" name="sofiaDtmfDurationSpin">
<property name="maximum">
<number>1000</number>
</property>
@ -887,7 +887,7 @@
</layout>
</widget>
<resources>
<include location="resources.qrc"/>
<include location="../resources.qrc"/>
</resources>
<connections>
<connection>

View File

@ -11,6 +11,11 @@ PrefSofia::PrefSofia(Ui::PrefDialog *ui, QObject *parent) :
void PrefSofia::readConfig()
{
int guess_mask;
char guess_ip[80];
switch_find_local_ip(guess_ip, sizeof(guess_ip), &guess_mask, AF_INET);
_ui->sofiaRtpIpEdit->setText(QString(guess_ip));
_ui->sofiaSipIpEdit->setText(QString(guess_ip));
}
void PrefSofia::writeConfig()
@ -18,6 +23,40 @@ void PrefSofia::writeConfig()
_settings->beginGroup("FreeSWITCH/conf");
_settings->beginGroup("sofia.conf");
/* General Settings */
_settings->setValue("log-level", _ui->sofiaLogLevelSpin->value());
_settings->setValue("auto-restart", _ui->sofiaAutoRestartCombo->currentText());
_settings->setValue("debug-presence", _ui->sofiaDebugPresenceSpin->value());
_settings->setValue("rewrite-multicasted-fs-path", _ui->sofiaRewriteMulticastedFsPathCombo->currentText());
/* Profile settings */
_settings->setValue("user-agent-string", _ui->sofiaUserAgentStringEdit->text());
_settings->setValue("debug", _ui->sofiaDebugSpin->value());
_settings->setValue("sip-trace", _ui->sofiaSipTraceCombo->currentText());
_settings->setValue("context", _ui->sofiaContextEdit->text());
_settings->setValue("rfc2833-pt", _ui->sofiaRfc2833PtEdit->text());
_settings->setValue("sip-port", _ui->sofiaSipPortSpin->value());
_settings->setValue("dialplan", _ui->sofiaDialplanEdit->text());
_settings->setValue("dtmf-duration", _ui->sofiaDtmfDurationSpin->value());
_settings->setValue("codec-prefs", _ui->sofiaCodecPrefsEdit->text());
_settings->setValue("use-rtp-timer", _ui->sofiaUseRtpTimerCombo->currentText());
_settings->setValue("rtp-timer-name", _ui->sofiaRtpTimerNameEdit->text());
_settings->setValue("rtp-ip", _ui->sofiaRtpIpEdit->text());
_settings->setValue("sip-ip", _ui->sofiaSipIpEdit->text());
_settings->setValue("hold-music", _ui->sofiaHoldMusicEdit->text());
_settings->setValue("apply-nat-acl", _ui->sofiaApplyNatAclEdit->text());
_settings->setValue("manage-presence", _ui->sofiaManagePresenceCombo->currentText());
_settings->setValue("max-proceeding", _ui->sofiaMaxProceedingEdit->text());
_settings->setValue("inbound-codec-negotiation", _ui->sofiaInboundCodecNegotiationCombo->currentText());
_settings->setValue("nonce-ttl", _ui->sofiaNonceTtlSpin->value());
_settings->setValue("auth-calls", _ui->sofiaAuthCallsCombo->currentText());
_settings->setValue("auth-all-packets", _ui->sofiaAuthAllPacketsCombo->currentText());
_settings->setValue("ext-rtp-ip", _ui->sofiaExtRtpIpEdit->text());
_settings->setValue("ext-sip-ip", _ui->sofiaExtSipIpEdit->text());
_settings->setValue("rtp-timeout-sec", _ui->sofiaRtpTimeoutSecSpin->value());
_settings->setValue("rtp-hold-timeout-sec", _ui->sofiaRtpHoldTimeoutSecSpin->value());
_settings->setValue("disable-register", _ui->sofiaDisableRegisterCombo->currentText());
_settings->setValue("challenge-realm", _ui->sofiaChallengeRealmCombo->currentText());
_settings->endGroup();

View File

@ -10,6 +10,7 @@
<file alias="example.xml">conf/accounts/example.xml</file>
<file alias="event_socket.conf.xml">conf/event_socket.conf.xml</file>
<file alias="portaudio.conf.xml">conf/portaudio.conf.xml</file>
<file alias="sofia.conf.xml">conf/sofia.conf.xml</file>
</qresource>
<qresource prefix="/sounds">
<file alias="test.wav">resources/test.wav</file>