From 2cbd6788372ee8ee0dce36e79b1405cb98d8ce29 Mon Sep 17 00:00:00 2001 From: Alexandre Savard Date: Mon, 4 Jan 2010 11:22:58 -0500 Subject: [PATCH] [#2623] Add interface name in account --- sflphone-common/src/sip/sipaccount.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sflphone-common/src/sip/sipaccount.h b/sflphone-common/src/sip/sipaccount.h index 58c3d1dc2..db4dbb17f 100644 --- a/sflphone-common/src/sip/sipaccount.h +++ b/sflphone-common/src/sip/sipaccount.h @@ -196,6 +196,17 @@ class SIPAccount : public Account */ std::string getContactHeader(const std::string& address, const std::string& port); + /** + * Set the interface name on which this account is bound, "default" means + * that the account is bound to the ANY interafec (0.0.0.0). This method should be + * when binding the account to a new sip transport only. + */ + inline voidsetLocalInterface(const std::string interface&) {_interface = interface;} + + /** + * Get the local interface name on which this account is bound. + */ + inline std::string getLocalInterface(void) { return _interface; } /** * Get a flag which determine the usage in sip headers of either the local @@ -328,6 +339,9 @@ class SIPAccount : public Account // Network settings std::string _registrationExpire; + // interface name on which this account is bound + std::string _interface; + // Flag which determine if _localIpAddress or _publishedIpAddress is used in // sip headers bool _publishedSameasLocal;