Commit e0e17c83 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2274] Set display name for "Contact" sip header as the hostname

parent da36bcaa
...@@ -514,6 +514,10 @@ std::string SIPAccount::getContactHeader (const std::string& address, const std: ...@@ -514,6 +514,10 @@ std::string SIPAccount::getContactHeader (const std::string& address, const std:
transport = ""; transport = "";
} }
_displayName = Manager::instance().getConfigString(_accountID, DISPLAY_NAME);
_debug("Display Name: %s\n", _displayName.c_str());
int len = pj_ansi_snprintf (contact, PJSIP_MAX_URL_SIZE, int len = pj_ansi_snprintf (contact, PJSIP_MAX_URL_SIZE,
"%s%s<%s%s%s%s%s%s:%d%s>", "%s%s<%s%s%s%s%s%s:%d%s>",
......
...@@ -321,7 +321,7 @@ class SIPAccount : public Account ...@@ -321,7 +321,7 @@ class SIPAccount : public Account
pjsip_transport_type_e _transportType; pjsip_transport_type_e _transportType;
pjsip_transport* _transport; pjsip_transport* _transport;
// Special hack that is not here to stay // Special hack that is not here to stay
// See #1852 // See #1852
...@@ -337,19 +337,19 @@ class SIPAccount : public Account ...@@ -337,19 +337,19 @@ class SIPAccount : public Account
// a sip transport. // a sip transport.
pjsip_tls_setting * _tlsSetting; pjsip_tls_setting * _tlsSetting;
// The STUN server name, if applicable // The STUN server name, if applicable
pj_str_t _stunServerName; pj_str_t _stunServerName;
// The STUN server port, if applicable // The STUN server port, if applicable
pj_uint16_t _stunPort; pj_uint16_t _stunPort;
// Display Name that can be used in SIP URI. // Display Name that can be used in SIP URI.
std::string _displayName; std::string _displayName;
// The actual address we use in the SDP to be contacted // The actual address we use in the SDP to be contacted
// it needs to be per account, otherwise the same address is used for every account // it needs to be per account, otherwise the same address is used for every account
std::string _actualSessionAddress; std::string _actualSessionAddress;
pj_uint16_t _actualSessionPort; pj_uint16_t _actualSessionPort;
}; };
#endif #endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment