[Ekiga-devel-list] Registrar compliance



Yesterday Robert checked commit 23341 into Opal stable which allows Ekiga to deal with registrars which do not allow RFC1918-IPs and which may possibly help in complex interface situations as reported in http://bugzilla.gnome.org/show_bug.cgi?id=592012 . To use Opal's capabilities I have adapted my patch to Ekiga stable (attached) with which you have to place the string %limit into the account name. For me it works for a noRFC provider. Regarding the various possibilities of non-compliant registrars a simple boolean "is_limited" is rather simple minded. On the other hand have we only one method to deal with these registrars at the moment. How shall I proceed?
Michael
diff -ur ekiga.orig/lib/engine/components/opal/opal-account.cpp ekiga/lib/engine/components/opal/opal-account.cpp
--- ekiga.orig/lib/engine/components/opal/opal-account.cpp	2009-09-06 12:58:19.000000000 +0200
+++ ekiga/lib/engine/components/opal/opal-account.cpp	2009-09-06 12:59:10.000000000 +0200
@@ -122,6 +122,8 @@
   else
     type = Account::H323;
 
+  limited = (name.find ("%limit") != std::string::npos);
+
   registration_event.connect (sigc::mem_fun (this, &Opal::Account::on_registration_event));
 }
 
@@ -277,6 +279,12 @@
 }
 
 
+bool Opal::Account::is_limited () const
+{
+  return limited;
+}
+
+
 bool Opal::Account::is_active () const
 {
   return active;
diff -ur ekiga.orig/lib/engine/components/opal/opal-account.h ekiga/lib/engine/components/opal/opal-account.h
--- ekiga.orig/lib/engine/components/opal/opal-account.h	2009-09-06 12:58:19.000000000 +0200
+++ ekiga/lib/engine/components/opal/opal-account.h	2009-09-06 12:59:10.000000000 +0200
@@ -122,6 +122,8 @@
 
     bool is_enabled () const;
 
+    bool is_limited () const;
+
     bool is_active () const;
 
     void remove ();
@@ -145,6 +147,7 @@
     bool dead;
     bool active;
     bool enabled;
+    bool limited;
     unsigned timeout;
     std::string aid;
     std::string name;
diff -ur ekiga.orig/lib/engine/components/opal/sip-endpoint.cpp ekiga/lib/engine/components/opal/sip-endpoint.cpp
--- ekiga.orig/lib/engine/components/opal/sip-endpoint.cpp	2009-09-06 12:58:19.000000000 +0200
+++ ekiga/lib/engine/components/opal/sip-endpoint.cpp	2009-09-06 13:00:41.000000000 +0200
@@ -82,6 +82,7 @@
 			    account.get_authentication_username (),
 			    account.get_password (),
 			    account.is_enabled (),
+			    account.is_limited (),
 			    account.get_timeout ());
 	} else {
 
@@ -555,6 +556,7 @@
 			       const std::string auth_username,
 			       const std::string password,
 			       bool is_enabled,
+			       bool is_limited,
 			       unsigned timeout)
 {
   PString _aor;
@@ -572,6 +574,8 @@
   SIPRegister::Params params;
   params.m_addressOfRecord = aor.str ();
   params.m_registrarAddress = host_;
+  if (is_limited)
+    params.m_compatibility = SIPRegister::e_CannotRegisterMultipleContacts;
   params.m_authID = auth_username;
   params.m_password = password;
   params.m_expire = is_enabled ? timeout : 0;
diff -ur ekiga.orig/lib/engine/components/opal/sip-endpoint.h ekiga/lib/engine/components/opal/sip-endpoint.h
--- ekiga.orig/lib/engine/components/opal/sip-endpoint.h	2009-09-06 12:58:19.000000000 +0200
+++ ekiga/lib/engine/components/opal/sip-endpoint.h	2009-09-06 12:59:10.000000000 +0200
@@ -153,6 +153,7 @@
 		     const std::string auth_username,
 		     const std::string password,
 		     bool is_enabled,
+		     bool is_limited,
 		     unsigned timeout);
 
       void OnRegistered (const PString & aor,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]