Re: [Ekiga-devel-list] Incoming calls not detected [latest]



Andre Kirchner wrote:
Hi,

I came up with a fix for this problem. Don't merge
this patch into the cvs stream yet because it might
break something else, and could be much cleaner (I
think).
But test it and let me know if you have any problem.

Andre




------------------------------------------------------------------------

--- ./build_01/ekiga/src/endpoints/manager.h	2006-11-05 05:27:45.000000000 -0800
+++ ./build/ekiga/src/endpoints/manager.h	2007-02-01 16:01:46.000000000 -0800
@@ -247,6 +247,11 @@
    * 		     OnShowIncoming will be called on the PCSS Endpoint.
    * PRE          :  /
    */
+
+  BOOL OnIncomingConnection(OpalConnection &,
+                            unsigned,
+                            OpalConnection::StringOptions *);
+

ok, but cast to OpalConnection::StringOptions* or get() calls needed on endpoint.xxx in sip.cpp and h323.cpp, got it compiled with reinterpret_cast<OpalConnection::StringOptions*>( but this will surely fail at runtime if forwarding set.

but calls can be answered now ;)

06:46:07 Started Ekiga 2.1.0 for user schorpp
06:46:18 Set STUN server to stun.sipgate.net (Port Restricted NAT)
06:46:36 Call from tom2 schorpp
06:46:47 Opened VIA 8237 for recording with plugin ALSA
06:46:47 Opened codec Speex for transmission
06:46:48 Opened VIA 8237 for playing with plugin ALSA
06:46:48 Opened codec PCMA for reception
06:46:48 Opening video device StaticPicture with plugin Picture
06:46:48 Successfully opened video device StaticPicture, channel 0
06:46:48 Opened codec h261 for transmission
06:46:48 Opened codec h261 for reception
06:46:48 Connected with tom2 schorpp using Ekiga	2.0.3
06:47:54 Closed codec Speex which was opened for transmission
06:47:54 Closed codec PCMA which was opened for reception
06:47:54 Closed codec h261 which was opened for transmission
06:47:55 Closed codec h261 which was opened for reception
06:47:55 Local user cleared the call

with:

  default:
 case 0:
   res = OpalManager::OnIncomingConnection (connection, 0, NULL);
   break;
 }
case 2:
-    connection.ForwardCall (extra);
 case 2:
+    connection.ForwardCall ((const char *) extra);

wont surely work, too, just a compile override, we need data from the Call class maybe.


   BOOL OnIncomingConnection (OpalConnection &,
 			     int,
 			     PString);



delete, no more used by the callback callers.

------------------------------------------------------------------------

--- ./build_01/ekiga/src/endpoints/manager.cpp	2007-02-01 16:04:18.000000000 -0800
+++ ./build/ekiga/src/endpoints/manager.cpp	2007-02-01 16:10:21.000000000 -0800
@@ -837,6 +837,16 @@
   }
 }
+BOOL
+GMManager::OnIncomingConnection (OpalConnection &connection,
+ unsigned reason, + OpalConnection::StringOptions * extra)
+{
+//PString tmp("");
+//return OnIncomingConnection(connection, reason, tmp);
+
+  return OnIncomingConnection(connection, reason, PString(NULL));
+}
BOOL
 GMManager::OnIncomingConnection (OpalConnection &connection,
@@ -892,6 +902,7 @@
     break;
case 2:
+
     connection.ForwardCall (extra);
     res = FALSE;
     short_reason = g_strdup (_("Forwarding incoming call"));
@@ -899,6 +910,7 @@
g_strdup_printf (_("Forwarding incoming call from %s to %s"), utf8_name, (const char *) extra);
     break;
+
case 4:
     res = TRUE;
@@ -907,7 +919,17 @@
 				   (const char *) utf8_name);
   default:
   case 0:
-    res = OpalManager::OnIncomingConnection (connection);
+    OpalCall & call = connection.GetCall();
+
+    // See if we already have a B-Party in the call. If not, make one.
+    if (call.GetOtherPartyConnection(connection) != NULL){
+      res = TRUE;
+      break;
+    }
+    else
+      // Use a routing algorithm to figure out who the B-Party is, then make a connection
+      res = MakeConnection(call, OnRouteConnection(connection), NULL, 0, NULL);
+
     break;
   }

i dont think this is needed, just adapt arguments to using the new StringOptions type and get() the PString(?) then pass to subsequent calls (which are still taking native const char* type args), I cant find the definition by now.

y
tom




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