diff --git a/daemon/src/account.h b/daemon/src/account.h index 080f544ad80def92891488051c72889def2e6ee0..d22e153f6b5bf543153829dd9a604689fe3b9863 100644 --- a/daemon/src/account.h +++ b/daemon/src/account.h @@ -72,6 +72,9 @@ static const char *const CONFIG_ACCOUNT_ALIAS = "Account.alias"; static const char *const CONFIG_ACCOUNT_MAILBOX = "Account.mailbox"; static const char *const CONFIG_ACCOUNT_ENABLE = "Account.enable"; static const char *const CONFIG_ACCOUNT_REGISTRATION_EXPIRE = "Account.registrationExpire"; +static const char *const CONFIG_ACCOUNT_REGISTRATION_STATUS = "Account.registrationStatus"; +static const char *const CONFIG_ACCOUNT_REGISTRATION_STATE_CODE = "Account.registrationCode"; +static const char *const CONFIG_ACCOUNT_REGISTRATION_STATE_DESC = "Account.registrationDescription"; static const char *const CONFIG_CREDENTIAL_NUMBER = "Credential.count"; static const char *const CONFIG_ACCOUNT_DTMF_TYPE = "Account.dtmfType"; static const char *const CONFIG_RINGTONE_PATH = "Account.ringtonePath"; @@ -124,10 +127,6 @@ static const char *const CONFIG_TLS_REQUIRE_CLIENT_CERTIFICATE = "TLS.requireCli static const char *const CONFIG_TLS_NEGOTIATION_TIMEOUT_SEC = "TLS.negotiationTimeoutSec"; static const char *const CONFIG_TLS_NEGOTIATION_TIMEOUT_MSEC = "TLS.negotiationTimemoutMsec"; -static const char *const CONFIG_REGISTRATION_STATUS = "Registration.Status"; -static const char *const CONFIG_REGISTRATION_STATE_CODE = "Registration.code"; -static const char *const CONFIG_REGISTRATION_STATE_DESCRIPTION = "Registration.description"; - // General configuration keys for accounts static const char * const ALIAS_KEY = "alias"; static const char * const TYPE_KEY = "type"; diff --git a/daemon/src/dbus/configurationmanager-introspec.xml b/daemon/src/dbus/configurationmanager-introspec.xml index a990a0be463994ea5c61a68778e615f23be1c61c..50c93ca1355a2c402799407034c4e44343886730 100644 --- a/daemon/src/dbus/configurationmanager-introspec.xml +++ b/daemon/src/dbus/configurationmanager-introspec.xml @@ -37,9 +37,9 @@ <li>DISPLAY_NAMEL: The display name</li> <li>STUN_ENABLE: True or False (Default: False)</li> <li>STUN_SERVER: The STUN server address</li> - <li>REGISTRATION_STATUS: The account registration status. Should be Registered to make calls.</li> - <li>REGISTRATION_STATE_CODE</li> - <li>REGISTRATION_STATE_DESCRIPTION</li> + <li>ACCOUNT_REGISTRATION_STATUS: The account registration status. Should be Registered to make calls.</li> + <li>ACCOUNT_REGISTRATION_STATE_CODE</li> + <li>ACCOUNT_REGISTRATION_STATE_DESC</li> <li>SRTP_KEY_EXCHANGE</li> <li>SRTP_ENABLE: Whether or not voice communication are encrypted - True or False (Default: False)</li> <li>SRTP_RTP_FALLBACK</li> diff --git a/daemon/src/iax/iaxaccount.cpp b/daemon/src/iax/iaxaccount.cpp index 5fbc1dc913942a1094af99d054b06ed2ca0a4989..0e659dc258bd13fc4bd9d5644d51d6bd9d24c968 100644 --- a/daemon/src/iax/iaxaccount.cpp +++ b/daemon/src/iax/iaxaccount.cpp @@ -126,7 +126,7 @@ std::map<std::string, std::string> IAXAccount::getAccountDetails() const RegistrationState state(registrationState_); - a[CONFIG_REGISTRATION_STATUS] = mapStateNumberToString(state); + a[CONFIG_ACCOUNT_REGISTRATION_STATUS] = mapStateNumberToString(state); a[CONFIG_ACCOUNT_USERAGENT] = userAgent_; return a; diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp index d983127b0a91058dc17d2a96c64a4c11d7ec639c..6fefc9c4c61ee80873353e7c87daa2598b1369f5 100644 --- a/daemon/src/sip/sipaccount.cpp +++ b/daemon/src/sip/sipaccount.cpp @@ -485,9 +485,9 @@ std::map<std::string, std::string> SIPAccount::getAccountDetails() const registrationStateDescription = registrationStateDetailed_.second; } - a[CONFIG_REGISTRATION_STATUS] = isIP2IP() ? "READY": mapStateNumberToString(state); - a[CONFIG_REGISTRATION_STATE_CODE] = registrationStateCode; - a[CONFIG_REGISTRATION_STATE_DESCRIPTION] = registrationStateDescription; + a[CONFIG_ACCOUNT_REGISTRATION_STATUS] = isIP2IP() ? "READY": mapStateNumberToString(state); + a[CONFIG_ACCOUNT_REGISTRATION_STATE_CODE] = registrationStateCode; + a[CONFIG_ACCOUNT_REGISTRATION_STATE_DESC] = registrationStateDescription; // Add sip specific details a[CONFIG_ACCOUNT_ROUTESET] = serviceRoute_; diff --git a/gnome/src/actions.c b/gnome/src/actions.c index a5487e3b5bfb34212a54be6d02f82c9cf9e62153..7511f3a36fabcf5c1a86f371533250ed19da5887 100644 --- a/gnome/src/actions.c +++ b/gnome/src/actions.c @@ -217,7 +217,7 @@ void sflphone_fill_account_list(void) account_list_add(acc); /* Fill the actual array of credentials */ dbus_get_credentials(acc); - gchar * status = account_lookup(acc, REGISTRATION_STATUS); + gchar * status = account_lookup(acc, ACCOUNT_REGISTRATION_STATUS); if (g_strcmp0(status, "REGISTERED") == 0) acc->state = ACCOUNT_STATE_REGISTERED; @@ -242,10 +242,10 @@ void sflphone_fill_account_list(void) else acc->state = ACCOUNT_STATE_INVALID; - gchar * code = account_lookup(acc, REGISTRATION_STATE_CODE); + gchar * code = account_lookup(acc, ACCOUNT_REGISTRATION_STATE_CODE); if (code != NULL) acc->protocol_state_code = atoi(code); - acc->protocol_state_description = account_lookup(acc, REGISTRATION_STATE_DESCRIPTION); + acc->protocol_state_description = account_lookup(acc, ACCOUNT_REGISTRATION_STATE_DESC); } g_strfreev(array); diff --git a/gnome/src/dbus/configurationmanager-introspec.xml b/gnome/src/dbus/configurationmanager-introspec.xml index a990a0be463994ea5c61a68778e615f23be1c61c..50c93ca1355a2c402799407034c4e44343886730 100644 --- a/gnome/src/dbus/configurationmanager-introspec.xml +++ b/gnome/src/dbus/configurationmanager-introspec.xml @@ -37,9 +37,9 @@ <li>DISPLAY_NAMEL: The display name</li> <li>STUN_ENABLE: True or False (Default: False)</li> <li>STUN_SERVER: The STUN server address</li> - <li>REGISTRATION_STATUS: The account registration status. Should be Registered to make calls.</li> - <li>REGISTRATION_STATE_CODE</li> - <li>REGISTRATION_STATE_DESCRIPTION</li> + <li>ACCOUNT_REGISTRATION_STATUS: The account registration status. Should be Registered to make calls.</li> + <li>ACCOUNT_REGISTRATION_STATE_CODE</li> + <li>ACCOUNT_REGISTRATION_STATE_DESC</li> <li>SRTP_KEY_EXCHANGE</li> <li>SRTP_ENABLE: Whether or not voice communication are encrypted - True or False (Default: False)</li> <li>SRTP_RTP_FALLBACK</li> diff --git a/gnome/src/sflphone_const.h b/gnome/src/sflphone_const.h index 62e2887a86e6617a32b38504ecf61dcfdcc47ee0..728b60dce5577922e0eef6fb4274a417dbcfd385 100644 --- a/gnome/src/sflphone_const.h +++ b/gnome/src/sflphone_const.h @@ -60,6 +60,10 @@ #define ACCOUNT_MAILBOX "Account.mailbox" #define ACCOUNT_USERAGENT "Account.useragent" #define ACCOUNT_REGISTRATION_EXPIRE "Account.registrationExpire" +#define ACCOUNT_REGISTRATION_STATUS "Account.registrationStatus" +#define ACCOUNT_REGISTRATION_STATE_CODE "Account.registrationCode" +#define ACCOUNT_REGISTRATION_STATE_DESC "Account.registrationDescription" + #define ACCOUNT_SIP_STUN_SERVER "STUN.server" #define ACCOUNT_SIP_STUN_ENABLED "STUN.enable" #define ACCOUNT_DTMF_TYPE "Account.dtmfType" @@ -104,10 +108,6 @@ #define PUBLISHED_PORT "Account.publishedPort" #define PUBLISHED_ADDRESS "Account.publishedAddress" -#define REGISTRATION_STATUS "Registration.Status" -#define REGISTRATION_STATE_CODE "Registration.code" -#define REGISTRATION_STATE_DESCRIPTION "Registration.description" - #define SHORTCUT_PICKUP "pickUp" #define SHORTCUT_HANGUP "hangUp" #define SHORTCUT_POPUP "popupWindow" diff --git a/kde/src/dbus/configurationmanager-introspec.xml b/kde/src/dbus/configurationmanager-introspec.xml index 926ff774de75a99636920b3dc711ab6914695cb9..50c93ca1355a2c402799407034c4e44343886730 100755 --- a/kde/src/dbus/configurationmanager-introspec.xml +++ b/kde/src/dbus/configurationmanager-introspec.xml @@ -37,9 +37,9 @@ <li>DISPLAY_NAMEL: The display name</li> <li>STUN_ENABLE: True or False (Default: False)</li> <li>STUN_SERVER: The STUN server address</li> - <li>REGISTRATION_STATUS: The account registration status. Should be Registered to make calls.</li> - <li>REGISTRATION_STATE_CODE</li> - <li>REGISTRATION_STATE_DESCRIPTION</li> + <li>ACCOUNT_REGISTRATION_STATUS: The account registration status. Should be Registered to make calls.</li> + <li>ACCOUNT_REGISTRATION_STATE_CODE</li> + <li>ACCOUNT_REGISTRATION_STATE_DESC</li> <li>SRTP_KEY_EXCHANGE</li> <li>SRTP_ENABLE: Whether or not voice communication are encrypted - True or False (Default: False)</li> <li>SRTP_RTP_FALLBACK</li> @@ -447,6 +447,21 @@ <signal name="accountsChanged" tp:name-for-bindings="accountsChanged"> </signal> + <signal name="registrationStateChanged" tp:name-for-bindings="registrationStateChanged"> + <arg type="s" name="accountID"/> + <arg type="i" name="registration_state"/> + </signal> + + <signal name="stunStatusFailure" tp:name-for_bindings="stunStatusFailure"> + <arg type="s" name="reason"> + </arg> + </signal> + + <signal name="stunStatusSuccess" tp:name-for_bindings="stunStatusSuccess"> + <arg type="s" name="message"> + </arg> + </signal> + <signal name="errorAlert" tp:name-for-bindings="errorAlert"> <arg type="i" name="code"> </arg>