summaryrefslogtreecommitdiffstats
path: root/src/phone_user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/phone_user.cpp')
-rw-r--r--src/phone_user.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/phone_user.cpp b/src/phone_user.cpp
index c52f396..fded2b5 100644
--- a/src/phone_user.cpp
+++ b/src/phone_user.cpp
@@ -769,10 +769,10 @@ void t_phone_user::handle_response_register(t_response *r, bool &re_register) {
phone->start_timer(PTMR_TCP_PING, this);
}
- // Registration succeeded. If sollicited MWI is provisioned
+ // Registration succeeded. If solicited MWI is provisioned
// and no MWI subscription is established yet, then subscribe
// to MWI.
- if (user_config->get_mwi_sollicited() && !mwi_auto_resubscribe) {
+ if (user_config->get_mwi_solicited() && !mwi_auto_resubscribe) {
subscribe_mwi();
}
@@ -978,9 +978,9 @@ bool t_phone_user::is_mwi_terminated(void) const {
return mwi_dialog == NULL;
}
-void t_phone_user::handle_mwi_unsollicited(t_request *r, t_tid tid) {
- if (user_config->get_mwi_sollicited()) {
- // Unsollicited MWI is not supported
+void t_phone_user::handle_mwi_unsolicited(t_request *r, t_tid tid) {
+ if (user_config->get_mwi_solicited()) {
+ // Unsolicited MWI is not supported
t_response *resp = r->create_response(R_403_FORBIDDEN);
phone->send_response(resp, 0, tid);
MEMMAN_DELETE(resp);
@@ -1186,13 +1186,13 @@ void t_phone_user::recvd_notify(t_request *r, t_tid tid) {
bool partial_match = false;
if (r->hdr_to.tag.empty()) {
- // Unsollicited NOTIFY
- handle_mwi_unsollicited(r, tid);
+ // Unsolicited NOTIFY
+ handle_mwi_unsolicited(r, tid);
return;
}
if (mwi_dialog && mwi_dialog->match_request(r, partial_match)) {
- // Sollicited NOTIFY
+ // Solicited NOTIFY
mwi_dialog->recvd_request(r, 0, tid);
cleanup_mwi_dialog();
return;
@@ -1499,7 +1499,7 @@ bool t_phone_user::get_last_reg_failed(void) const {
string t_phone_user::get_ip_sip(const string &auto_ip) const {
if (stun_public_ip_sip) return h_ip2str(stun_public_ip_sip);
- if (user_config->get_use_nat_public_ip()) return user_config->get_nat_public_ip();
+ if (user_config->get_use_nat_public_ip()) return h_ip2str(gethostbyname(user_config->get_nat_public_ip()));
if (LOCAL_IP == AUTO_IP4_ADDRESS) return auto_ip;
return LOCAL_IP;
}